mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-23 18:15:22 +00:00
Handle clock out of sync issue
This commit is contained in:
parent
fc2a7bb5a9
commit
c47ecad024
@ -404,6 +404,15 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
registerMessageStatusObserver("sendingMessage");
|
||||
registerMessageStatusObserver("messageSent");
|
||||
registerMessageStatusObserver("messageFailed");
|
||||
BroadcastReceiver broadcastReceiver = new BroadcastReceiver() {
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
Toast.makeText(ConversationActivity.this, "Your clock is out of sync with the service node network.", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
};
|
||||
broadcastReceivers.add(broadcastReceiver);
|
||||
LocalBroadcastManager.getInstance(this).registerReceiver(broadcastReceiver, new IntentFilter("clockOutOfSync"));
|
||||
|
||||
initializeReceivers();
|
||||
initializeActionBar();
|
||||
|
@ -6,6 +6,11 @@ import android.support.v4.content.LocalBroadcastManager
|
||||
|
||||
class Broadcaster(private val context: Context) : org.whispersystems.signalservice.loki.utilities.Broadcaster {
|
||||
|
||||
override fun broadcast(event: String) {
|
||||
val intent = Intent(event)
|
||||
LocalBroadcastManager.getInstance(context).sendBroadcast(intent)
|
||||
}
|
||||
|
||||
override fun broadcast(event: String, long: Long) {
|
||||
val intent = Intent(event)
|
||||
intent.putExtra("long", long)
|
||||
|
Loading…
Reference in New Issue
Block a user