mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 01:07: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));
|
.execute(VersionTracker.getLastSeenVersion(this));
|
||||||
} else {
|
} else {
|
||||||
VersionTracker.updateLastSeenVersion(this);
|
VersionTracker.updateLastSeenVersion(this);
|
||||||
MessageNotifier.updateNotification(DatabaseUpgradeActivity.this, masterSecret);
|
updateNotifications(this, masterSecret);
|
||||||
startActivity((Intent)getIntent().getParcelableExtra("next_intent"));
|
startActivity((Intent)getIntent().getParcelableExtra("next_intent"));
|
||||||
finish();
|
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 interface DatabaseUpgradeListener {
|
||||||
public void setProgress(int progress, int total);
|
public void setProgress(int progress, int total);
|
||||||
}
|
}
|
||||||
@ -230,7 +240,7 @@ public class DatabaseUpgradeActivity extends BaseActivity {
|
|||||||
@Override
|
@Override
|
||||||
protected void onPostExecute(Void result) {
|
protected void onPostExecute(Void result) {
|
||||||
VersionTracker.updateLastSeenVersion(DatabaseUpgradeActivity.this);
|
VersionTracker.updateLastSeenVersion(DatabaseUpgradeActivity.this);
|
||||||
MessageNotifier.updateNotification(DatabaseUpgradeActivity.this, masterSecret);
|
updateNotifications(DatabaseUpgradeActivity.this, masterSecret);
|
||||||
|
|
||||||
startActivity((Intent)getIntent().getParcelableExtra("next_intent"));
|
startActivity((Intent)getIntent().getParcelableExtra("next_intent"));
|
||||||
finish();
|
finish();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user