Fix crash when tapping re-register banner view.
This commit is contained in:
parent
74562432cf
commit
fff0b8b187
6 changed files with 6 additions and 12 deletions
|
@ -10,13 +10,8 @@ import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
|||
|
||||
public class UnauthorizedReminder extends Reminder {
|
||||
|
||||
public UnauthorizedReminder(final Context context) {
|
||||
public UnauthorizedReminder() {
|
||||
super(R.string.UnauthorizedReminder_this_is_likely_because_you_registered_your_phone_number_with_Signal_on_a_different_device);
|
||||
|
||||
setOkListener(v -> {
|
||||
context.startActivity(RegistrationNavigationActivity.newIntentForReRegistration(context));
|
||||
});
|
||||
|
||||
addAction(new Action(R.string.UnauthorizedReminder_reregister_action, R.id.reminder_action_re_register));
|
||||
}
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ class AppSettingsFragment : DSLSettingsFragment(
|
|||
if (ExpiredBuildReminder.isEligible()) {
|
||||
showReminder(ExpiredBuildReminder(context))
|
||||
} else if (UnauthorizedReminder.isEligible(context)) {
|
||||
showReminder(UnauthorizedReminder(context))
|
||||
showReminder(UnauthorizedReminder())
|
||||
} else {
|
||||
hideReminders()
|
||||
}
|
||||
|
|
|
@ -1732,7 +1732,7 @@ public class ConversationParentFragment extends Fragment
|
|||
reminderView.get().showReminder(new ExpiredBuildReminder(context));
|
||||
reminderView.get().setOnActionClickListener(this::handleReminderAction);
|
||||
} else if (UnauthorizedReminder.isEligible(context)) {
|
||||
reminderView.get().showReminder(new UnauthorizedReminder(context));
|
||||
reminderView.get().showReminder(new UnauthorizedReminder());
|
||||
reminderView.get().setOnActionClickListener(this::handleReminderAction);
|
||||
} else if (ServiceOutageReminder.isEligible(context)) {
|
||||
ApplicationDependencies.getJobManager().add(new ServiceOutageDetectionJob());
|
||||
|
|
|
@ -307,7 +307,7 @@ class ConversationRepository(
|
|||
return Maybe.fromCallable {
|
||||
val reminder: Reminder? = when {
|
||||
ExpiredBuildReminder.isEligible() -> ExpiredBuildReminder(applicationContext)
|
||||
UnauthorizedReminder.isEligible(applicationContext) -> UnauthorizedReminder(applicationContext)
|
||||
UnauthorizedReminder.isEligible(applicationContext) -> UnauthorizedReminder()
|
||||
ServiceOutageReminder.isEligible(applicationContext) -> {
|
||||
ApplicationDependencies.getJobManager().add(ServiceOutageDetectionJob())
|
||||
ServiceOutageReminder()
|
||||
|
|
|
@ -170,7 +170,6 @@ import org.thoughtcrime.securesms.util.AppStartup;
|
|||
import org.thoughtcrime.securesms.util.BottomSheetUtil;
|
||||
import org.thoughtcrime.securesms.util.CachedInflater;
|
||||
import org.thoughtcrime.securesms.util.ConversationUtil;
|
||||
import org.thoughtcrime.securesms.util.FeatureFlags;
|
||||
import org.thoughtcrime.securesms.util.PlayStoreUtil;
|
||||
import org.thoughtcrime.securesms.util.ServiceUtil;
|
||||
import org.thoughtcrime.securesms.util.SignalLocalMetrics;
|
||||
|
@ -1048,7 +1047,7 @@ public class ConversationListFragment extends MainFragment implements ActionMode
|
|||
if (ExpiredBuildReminder.isEligible()) {
|
||||
return Optional.of(new ExpiredBuildReminder(context));
|
||||
} else if (UnauthorizedReminder.isEligible(context)) {
|
||||
return Optional.of(new UnauthorizedReminder(context));
|
||||
return Optional.of(new UnauthorizedReminder());
|
||||
} else if (ServiceOutageReminder.isEligible(context)) {
|
||||
ApplicationDependencies.getJobManager().add(new ServiceOutageDetectionJob());
|
||||
return Optional.of(new ServiceOutageReminder());
|
||||
|
|
|
@ -154,7 +154,7 @@ class StoriesLandingFragment : DSLSettingsFragment(layoutId = R.layout.stories_l
|
|||
if (ExpiredBuildReminder.isEligible()) {
|
||||
showReminder(ExpiredBuildReminder(context))
|
||||
} else if (UnauthorizedReminder.isEligible(context)) {
|
||||
showReminder(UnauthorizedReminder(context))
|
||||
showReminder(UnauthorizedReminder())
|
||||
} else {
|
||||
hideReminders()
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue