diff --git a/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java b/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java index 5e0d427b57..41cb2330ce 100644 --- a/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java +++ b/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java @@ -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(); diff --git a/src/org/thoughtcrime/securesms/loki/redesign/utilities/Broadcaster.kt b/src/org/thoughtcrime/securesms/loki/redesign/utilities/Broadcaster.kt index cf2074b657..7460341bd5 100644 --- a/src/org/thoughtcrime/securesms/loki/redesign/utilities/Broadcaster.kt +++ b/src/org/thoughtcrime/securesms/loki/redesign/utilities/Broadcaster.kt @@ -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)