mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-24 10:51:27 +01:00
Show bottom sheet when you tap an avatar in the story viewer.
This commit is contained in:
@@ -2,6 +2,7 @@ package org.thoughtcrime.securesms.recipients.ui.bottomsheet;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
@@ -83,6 +84,7 @@ public final class RecipientBottomSheetDialogFragment extends BottomSheetDialogF
|
||||
private View buttonStrip;
|
||||
private View interactionsContainer;
|
||||
private BadgeImageView badgeImageView;
|
||||
private Callback callback;
|
||||
|
||||
public static BottomSheetDialogFragment create(@NonNull RecipientId recipientId,
|
||||
@Nullable GroupId groupId)
|
||||
@@ -341,6 +343,8 @@ public final class RecipientBottomSheetDialogFragment extends BottomSheetDialogF
|
||||
removeAdminButton.setEnabled(!busy);
|
||||
removeFromGroupButton.setEnabled(!busy);
|
||||
});
|
||||
|
||||
callback = getParentFragment() != null && getParentFragment() instanceof Callback ? (Callback) getParentFragment() : null;
|
||||
}
|
||||
|
||||
private void openSystemContactSheet(@NonNull Intent intent) {
|
||||
@@ -363,4 +367,16 @@ public final class RecipientBottomSheetDialogFragment extends BottomSheetDialogF
|
||||
public void show(@NonNull FragmentManager manager, @Nullable String tag) {
|
||||
BottomSheetUtil.show(manager, tag, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||
super.onDismiss(dialog);
|
||||
if (callback != null) {
|
||||
callback.onRecipientBottomSheetDismissed();
|
||||
}
|
||||
}
|
||||
|
||||
public interface Callback {
|
||||
void onRecipientBottomSheetDismissed();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user