mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 00:37:47 +00:00
Update notifications on background thread.
// FREEBIE
This commit is contained in:
parent
3edda51379
commit
d6179bc12b
@ -88,7 +88,7 @@ public class DatabaseUpgradeActivity extends BaseActivity {
|
||||
.execute(VersionTracker.getLastSeenVersion(this));
|
||||
} else {
|
||||
VersionTracker.updateLastSeenVersion(this);
|
||||
MessageNotifier.updateNotification(DatabaseUpgradeActivity.this, masterSecret);
|
||||
updateNotifications(this, masterSecret);
|
||||
startActivity((Intent)getIntent().getParcelableExtra("next_intent"));
|
||||
finish();
|
||||
}
|
||||
@ -123,6 +123,16 @@ public class DatabaseUpgradeActivity extends BaseActivity {
|
||||
}
|
||||
}
|
||||
|
||||
private void updateNotifications(final Context context, final MasterSecret masterSecret) {
|
||||
new AsyncTask<Void, Void, Void>() {
|
||||
@Override
|
||||
protected Void doInBackground(Void... params) {
|
||||
MessageNotifier.updateNotification(context, masterSecret);
|
||||
return null;
|
||||
}
|
||||
}.execute();
|
||||
}
|
||||
|
||||
public interface DatabaseUpgradeListener {
|
||||
public void setProgress(int progress, int total);
|
||||
}
|
||||
@ -230,7 +240,7 @@ public class DatabaseUpgradeActivity extends BaseActivity {
|
||||
@Override
|
||||
protected void onPostExecute(Void result) {
|
||||
VersionTracker.updateLastSeenVersion(DatabaseUpgradeActivity.this);
|
||||
MessageNotifier.updateNotification(DatabaseUpgradeActivity.this, masterSecret);
|
||||
updateNotifications(DatabaseUpgradeActivity.this, masterSecret);
|
||||
|
||||
startActivity((Intent)getIntent().getParcelableExtra("next_intent"));
|
||||
finish();
|
||||
|
Loading…
x
Reference in New Issue
Block a user