Fix overlay activating when tapping chat & tweaks
This commit is contained in:
parent
f72f6fc0f6
commit
3e52e6b9d2
7 changed files with 8 additions and 12 deletions
|
|
@ -39,7 +39,7 @@ class Chat extends StatelessWidget {
|
|||
if (message.user != null && message.user != chatStore.auth.user.details?.login) {
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
FocusManager.instance.primaryFocus?.unfocus();
|
||||
FocusScope.of(context).unfocus();
|
||||
if (chatStore.assetsStore.showEmoteMenu) chatStore.assetsStore.showEmoteMenu = false;
|
||||
},
|
||||
onLongPress: () => showModalBottomSheet(
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class ChatDetails extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: FocusManager.instance.primaryFocus?.unfocus,
|
||||
onTap: FocusScope.of(context).unfocus,
|
||||
child: SafeArea(
|
||||
child: Observer(
|
||||
builder: (_) => Column(
|
||||
|
|
|
|||
|
|
@ -69,9 +69,9 @@ class _ChattersListState extends State<ChattersList> {
|
|||
suffixIcon: IconButton(
|
||||
tooltip: 'Clear Filter',
|
||||
onPressed: () {
|
||||
FocusScope.of(context).unfocus();
|
||||
chatDetailStore.filterText = '';
|
||||
_textController.clear();
|
||||
FocusManager.instance.primaryFocus?.unfocus();
|
||||
},
|
||||
icon: const Icon(Icons.clear),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ class ChatBottomBar extends StatelessWidget {
|
|||
tooltip: 'Emote Menu',
|
||||
icon: const Icon(Icons.emoji_emotions_outlined),
|
||||
onPressed: () {
|
||||
FocusManager.instance.primaryFocus?.unfocus();
|
||||
FocusScope.of(context).unfocus();
|
||||
chatStore.assetsStore.showEmoteMenu = !chatStore.assetsStore.showEmoteMenu;
|
||||
},
|
||||
),
|
||||
|
|
|
|||
|
|
@ -56,12 +56,8 @@ class _VideoChatState extends State<VideoChat> {
|
|||
onTap: () {
|
||||
if (chatStore.assetsStore.showEmoteMenu) {
|
||||
chatStore.assetsStore.showEmoteMenu = false;
|
||||
} else {
|
||||
if (chatStore.textFieldFocusNode.hasFocus) {
|
||||
chatStore.textFieldFocusNode.unfocus();
|
||||
} else {
|
||||
videoStore.handleVideoTap();
|
||||
}
|
||||
} else if (chatStore.textFieldFocusNode.hasFocus) {
|
||||
chatStore.textFieldFocusNode.unfocus();
|
||||
}
|
||||
},
|
||||
child: Chat(
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class Home extends StatelessWidget {
|
|||
final authStore = context.read<AuthStore>();
|
||||
|
||||
return GestureDetector(
|
||||
onTap: () => FocusManager.instance.primaryFocus?.unfocus(),
|
||||
onTap: FocusScope.of(context).unfocus,
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
centerTitle: false,
|
||||
|
|
|
|||
|
|
@ -40,10 +40,10 @@ class _SearchState extends State<Search> {
|
|||
suffixIcon: IconButton(
|
||||
tooltip: 'Clear Search',
|
||||
onPressed: () {
|
||||
FocusScope.of(context).unfocus();
|
||||
setState(() {
|
||||
textEditingController.clear();
|
||||
});
|
||||
FocusManager.instance.primaryFocus?.unfocus();
|
||||
},
|
||||
icon: const Icon(Icons.clear),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue