mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 18:30:20 +01:00
Show reminder banner to administrators for pending group join requests.
This commit is contained in:
committed by
Greyson Parrelli
parent
b46589cd14
commit
837ed76f85
@@ -0,0 +1,44 @@
|
||||
package org.thoughtcrime.securesms.components.reminder;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.database.GroupDatabase;
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore;
|
||||
import org.thoughtcrime.securesms.util.PlayStoreUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Shown to admins when there are pending group join requests.
|
||||
*/
|
||||
public final class PendingGroupJoinRequestsReminder extends Reminder {
|
||||
|
||||
private PendingGroupJoinRequestsReminder(@Nullable CharSequence title,
|
||||
@NonNull CharSequence text)
|
||||
{
|
||||
super(title, text);
|
||||
}
|
||||
|
||||
public static Reminder create(@NonNull Context context, int count) {
|
||||
String message = context.getResources().getQuantityString(R.plurals.PendingGroupJoinRequestsReminder_d_pending_member_requests, count, count);
|
||||
Reminder reminder = new PendingGroupJoinRequestsReminder(null, message);
|
||||
|
||||
reminder.addAction(new Action(context.getString(R.string.PendingGroupJoinRequestsReminder_view), R.id.reminder_action_review_join_requests));
|
||||
|
||||
return reminder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDismissable() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull Importance getImportance() {
|
||||
return Importance.NORMAL;
|
||||
}
|
||||
}
|
||||
@@ -74,7 +74,7 @@ public abstract class Reminder {
|
||||
NORMAL, ERROR, TERMINAL
|
||||
}
|
||||
|
||||
public final class Action {
|
||||
public static final class Action {
|
||||
private final CharSequence title;
|
||||
private final int actionId;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user