mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 18:00:02 +01:00
Send reactions.
This commit is contained in:
@@ -59,7 +59,7 @@ public final class ReactWithAnyEmojiBottomSheetDialogFragment extends FixedRound
|
||||
private static final String ARG_EDIT = "arg_edit";
|
||||
|
||||
private ReactWithAnyEmojiViewModel viewModel;
|
||||
private Callback callback;
|
||||
private Callback callback = null;
|
||||
private EmojiPageView emojiPageView;
|
||||
private KeyboardPageSearchView search;
|
||||
private View tabBar;
|
||||
@@ -123,6 +123,20 @@ public final class ReactWithAnyEmojiBottomSheetDialogFragment extends FixedRound
|
||||
return fragment;
|
||||
}
|
||||
|
||||
public static ReactWithAnyEmojiBottomSheetDialogFragment createForCallingReactions() {
|
||||
ReactWithAnyEmojiBottomSheetDialogFragment fragment = new ReactWithAnyEmojiBottomSheetDialogFragment();
|
||||
Bundle args = new Bundle();
|
||||
|
||||
args.putLong(ARG_MESSAGE_ID, -1);
|
||||
args.putBoolean(ARG_IS_MMS, false);
|
||||
args.putInt(ARG_START_PAGE, -1);
|
||||
args.putBoolean(ARG_SHADOWS, false);
|
||||
args.putString(ARG_RECENT_KEY, REACTION_STORAGE_KEY);
|
||||
fragment.setArguments(args);
|
||||
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach(@NonNull Context context) {
|
||||
super.onAttach(context);
|
||||
@@ -229,8 +243,7 @@ public final class ReactWithAnyEmojiBottomSheetDialogFragment extends FixedRound
|
||||
@Override
|
||||
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||
super.onDismiss(dialog);
|
||||
|
||||
callback.onReactWithAnyEmojiDialogDismissed();
|
||||
if (callback != null) callback.onReactWithAnyEmojiDialogDismissed();
|
||||
}
|
||||
|
||||
private void initializeViewModel() {
|
||||
@@ -244,7 +257,7 @@ public final class ReactWithAnyEmojiBottomSheetDialogFragment extends FixedRound
|
||||
@Override
|
||||
public void onEmojiSelected(String emoji) {
|
||||
viewModel.onEmojiSelected(emoji);
|
||||
callback.onReactWithAnyEmojiSelected(emoji);
|
||||
if (callback != null) callback.onReactWithAnyEmojiSelected(emoji);
|
||||
dismiss();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user