mirror of
https://github.com/wulkanowy/wulkanowy.git
synced 2025-01-19 00:06:46 -06:00
Stopping job when user not registered in app (#111)
This commit is contained in:
parent
0014b74c6b
commit
052d5e3911
@ -5,6 +5,7 @@ import android.os.Bundle;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import butterknife.ButterKnife;
|
||||
import io.github.wulkanowy.services.jobs.SyncJob;
|
||||
import io.github.wulkanowy.services.notifies.NotificationService;
|
||||
import io.github.wulkanowy.ui.base.BaseActivity;
|
||||
import io.github.wulkanowy.ui.login.LoginActivity;
|
||||
@ -47,4 +48,9 @@ public class SplashActivity extends BaseActivity implements SplashContract.View
|
||||
public void cancelNotifications() {
|
||||
new NotificationService(getApplicationContext()).cancelAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stopSyncService() {
|
||||
SyncJob.stop(getApplicationContext());
|
||||
}
|
||||
}
|
||||
|
@ -13,6 +13,8 @@ public interface SplashContract {
|
||||
void openMainActivity();
|
||||
|
||||
void cancelNotifications();
|
||||
|
||||
void stopSyncService();
|
||||
}
|
||||
|
||||
@PerActivity
|
||||
|
@ -24,6 +24,7 @@ public class SplashPresenter extends BasePresenter<SplashContract.View>
|
||||
getView().openMainActivity();
|
||||
} else {
|
||||
getView().openLoginActivity();
|
||||
getView().stopSyncService();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user