Search in sources :

Example 1 with UnauthorizedReminder

use of org.thoughtcrime.securesms.components.reminder.UnauthorizedReminder in project Signal-Android by signalapp.

the class ConversationActivity method updateReminders.

protected void updateReminders(boolean seenInvite) {
    Log.w(TAG, "updateReminders(" + seenInvite + ")");
    if (UnauthorizedReminder.isEligible(this)) {
        reminderView.get().showReminder(new UnauthorizedReminder(this));
    } else if (ExpiredBuildReminder.isEligible()) {
        reminderView.get().showReminder(new ExpiredBuildReminder(this));
    } else if (TextSecurePreferences.isPushRegistered(this) && TextSecurePreferences.isShowInviteReminders(this) && !isSecureText && !seenInvite && !recipient.isGroupRecipient()) {
        InviteReminder reminder = new InviteReminder(this, recipient);
        reminder.setOkListener(v -> {
            handleInviteLink();
            reminderView.get().requestDismiss();
        });
        reminderView.get().showReminder(reminder);
    } else if (reminderView.resolved()) {
        reminderView.get().hide();
    }
}
Also used : InviteReminder(org.thoughtcrime.securesms.components.reminder.InviteReminder) ExpiredBuildReminder(org.thoughtcrime.securesms.components.reminder.ExpiredBuildReminder) UnauthorizedReminder(org.thoughtcrime.securesms.components.reminder.UnauthorizedReminder)

Aggregations

ExpiredBuildReminder (org.thoughtcrime.securesms.components.reminder.ExpiredBuildReminder)1 InviteReminder (org.thoughtcrime.securesms.components.reminder.InviteReminder)1 UnauthorizedReminder (org.thoughtcrime.securesms.components.reminder.UnauthorizedReminder)1