Fix crash if you've been unregistered for couple months.

fork-5.53.8
Greyson Parrelli 2022-02-22 11:36:23 -05:00
rodzic cb66996407
commit 1b404cef34
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -1970,6 +1970,12 @@ public class ConversationParentFragment extends Fragment
final SettableFuture<Boolean> future = new SettableFuture<>();
final Context context = requireContext().getApplicationContext();
if (SignalStore.account().getAci() == null || SignalStore.account().getPni() == null) {
Log.w(TAG, "Not registered! Skipping initializeIdentityRecords()");
future.set(false);
return future;
}
new AsyncTask<Recipient, Void, Pair<IdentityRecordList, String>>() {
@Override
protected @NonNull Pair<IdentityRecordList, String> doInBackground(Recipient... params) {