mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-25 11:20:47 +01:00
Add support for GV2 group update messages.
This commit is contained in:
committed by
Greyson Parrelli
parent
1f994495f8
commit
326678f214
@@ -0,0 +1,23 @@
|
||||
package org.thoughtcrime.securesms.groups;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import org.signal.storageservice.protos.groups.AccessControl;
|
||||
import org.thoughtcrime.securesms.R;
|
||||
|
||||
public final class GV2AccessLevelUtil {
|
||||
|
||||
private GV2AccessLevelUtil() {
|
||||
}
|
||||
|
||||
public static String toString(@NonNull Context context, @NonNull AccessControl.AccessRequired attributeAccess) {
|
||||
switch (attributeAccess) {
|
||||
case ANY : return context.getString(R.string.GroupManagement_access_level_anyone);
|
||||
case MEMBER : return context.getString(R.string.GroupManagement_access_level_all_members);
|
||||
case ADMINISTRATOR : return context.getString(R.string.GroupManagement_access_level_only_admins);
|
||||
default : return context.getString(R.string.GroupManagement_access_level_unknown);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user