Fix issue with websocket connection after reregistering.
Big shoutout to @jonahbeckford for the investigation here. Thanks! Fixes #10939 Fixes #11095
This commit is contained in:
parent
713441d9cb
commit
fb0243a029
2 changed files with 6 additions and 0 deletions
|
@ -104,6 +104,10 @@ public class IncomingMessageObserver {
|
||||||
}, new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION));
|
}, new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public synchronized void notifyRegistrationChanged() {
|
||||||
|
notifyAll();
|
||||||
|
}
|
||||||
|
|
||||||
public synchronized void addDecryptionDrainedListener(@NonNull Runnable listener) {
|
public synchronized void addDecryptionDrainedListener(@NonNull Runnable listener) {
|
||||||
decryptionDrainedListeners.add(listener);
|
decryptionDrainedListeners.add(listener);
|
||||||
if (decryptionDrained) {
|
if (decryptionDrained) {
|
||||||
|
|
|
@ -17,6 +17,7 @@ import org.greenrobot.eventbus.EventBus;
|
||||||
import org.signal.core.util.logging.Log;
|
import org.signal.core.util.logging.Log;
|
||||||
import org.thoughtcrime.securesms.R;
|
import org.thoughtcrime.securesms.R;
|
||||||
import org.thoughtcrime.securesms.backup.BackupProtos;
|
import org.thoughtcrime.securesms.backup.BackupProtos;
|
||||||
|
import org.thoughtcrime.securesms.dependencies.ApplicationDependencies;
|
||||||
import org.thoughtcrime.securesms.jobmanager.impl.SqlCipherMigrationConstraintObserver;
|
import org.thoughtcrime.securesms.jobmanager.impl.SqlCipherMigrationConstraintObserver;
|
||||||
import org.thoughtcrime.securesms.keyvalue.SettingsValues;
|
import org.thoughtcrime.securesms.keyvalue.SettingsValues;
|
||||||
import org.thoughtcrime.securesms.lock.RegistrationLockReminders;
|
import org.thoughtcrime.securesms.lock.RegistrationLockReminders;
|
||||||
|
@ -919,6 +920,7 @@ public class TextSecurePreferences {
|
||||||
public static void setPushRegistered(Context context, boolean registered) {
|
public static void setPushRegistered(Context context, boolean registered) {
|
||||||
Log.i(TAG, "Setting push registered: " + registered);
|
Log.i(TAG, "Setting push registered: " + registered);
|
||||||
setBooleanPreference(context, REGISTERED_GCM_PREF, registered);
|
setBooleanPreference(context, REGISTERED_GCM_PREF, registered);
|
||||||
|
ApplicationDependencies.getIncomingMessageObserver().notifyRegistrationChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isShowInviteReminders(Context context) {
|
public static boolean isShowInviteReminders(Context context) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue