Prevent summoning own modal in chat

Forgot about De Morgan's Laws!
This commit is contained in:
Tommy Chow 2022-07-28 22:04:15 -04:00
parent 870e8ae916
commit b63a10f846

View file

@ -20,9 +20,11 @@ class ChatMessage extends StatelessWidget {
@override
Widget build(BuildContext context) {
void onLongPressName() {
// Ignore if the message is a recent message in the modal bottom sheet.
if (isModal) return;
if (ircMessage.user == null && ircMessage.user == chatStore.auth.user.details?.login) return;
// Ignore if long-pressing own username.
if (ircMessage.user == null || ircMessage.user == chatStore.auth.user.details?.login) return;
HapticFeedback.lightImpact();