mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 18:30:20 +01:00
Add the ability to forward content to multiple chats at once.
This commit is contained in:
committed by
Greyson Parrelli
parent
eacf03768f
commit
8d187c8ba1
@@ -72,6 +72,7 @@ public final class FeatureFlags {
|
||||
private static final String DEFAULT_MAX_BACKOFF = "android.defaultMaxBackoff";
|
||||
private static final String OKHTTP_AUTOMATIC_RETRY = "android.okhttpAutomaticRetry";
|
||||
private static final String ABOUT = "android.about";
|
||||
private static final String SHARE_SELECTION_LIMIT = "android.share.limit";
|
||||
|
||||
/**
|
||||
* We will only store remote values for flags in this set. If you want a flag to be controllable
|
||||
@@ -100,7 +101,8 @@ public final class FeatureFlags {
|
||||
AUTOMATIC_SESSION_INTERVAL,
|
||||
DEFAULT_MAX_BACKOFF,
|
||||
OKHTTP_AUTOMATIC_RETRY,
|
||||
ABOUT
|
||||
ABOUT,
|
||||
SHARE_SELECTION_LIMIT
|
||||
);
|
||||
|
||||
@VisibleForTesting
|
||||
@@ -139,7 +141,8 @@ public final class FeatureFlags {
|
||||
AUTOMATIC_SESSION_INTERVAL,
|
||||
DEFAULT_MAX_BACKOFF,
|
||||
OKHTTP_AUTOMATIC_RETRY,
|
||||
ABOUT
|
||||
ABOUT,
|
||||
SHARE_SELECTION_LIMIT
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -295,6 +298,11 @@ public final class FeatureFlags {
|
||||
return getInteger(CDS_REFRESH_INTERVAL, (int) TimeUnit.HOURS.toSeconds(48));
|
||||
}
|
||||
|
||||
public static @NonNull SelectionLimits shareSelectionLimit() {
|
||||
int limit = getInteger(SHARE_SELECTION_LIMIT, 5);
|
||||
return new SelectionLimits(limit, limit);
|
||||
}
|
||||
|
||||
/** The maximum number of grapheme */
|
||||
public static int getMaxGroupNameGraphemeLength() {
|
||||
return Math.max(32, getInteger(GROUP_NAME_MAX_LENGTH, -1));
|
||||
|
||||
@@ -30,6 +30,7 @@ import android.view.ViewTreeObserver;
|
||||
import android.view.animation.AlphaAnimation;
|
||||
import android.view.animation.Animation;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.IdRes;
|
||||
@@ -51,6 +52,20 @@ public final class ViewUtil {
|
||||
private ViewUtil() {
|
||||
}
|
||||
|
||||
public static void focusAndMoveCursorToEndAndOpenKeyboard(@NonNull EditText input) {
|
||||
input.requestFocus();
|
||||
|
||||
int numberLength = input.getText().length();
|
||||
input.setSelection(numberLength, numberLength);
|
||||
|
||||
InputMethodManager imm = (InputMethodManager) input.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
imm.showSoftInput(input, InputMethodManager.SHOW_IMPLICIT);
|
||||
|
||||
if (!imm.isAcceptingText()) {
|
||||
imm.toggleSoftInput(InputMethodManager.SHOW_IMPLICIT, InputMethodManager.HIDE_IMPLICIT_ONLY);
|
||||
}
|
||||
}
|
||||
|
||||
public static void focusAndShowKeyboard(@NonNull View view) {
|
||||
view.requestFocus();
|
||||
if (view.hasWindowFocus()) {
|
||||
|
||||
Reference in New Issue
Block a user