Update to message box and logo app bar

- In message\_box.dart, added a reset to the form key after sending a message.
- In logo\_app\_bar.dart, added a .then() to the Navigator.pushNamed() to call the init() method after navigating to the direct list.
This commit is contained in:
MohammadTaha Basiri 2024-04-01 20:05:53 +03:30
parent 0b9e57e654
commit 213e000aee
2 changed files with 5 additions and 2 deletions

View File

@ -129,8 +129,8 @@ class _TypingState extends State<_Typing> {
? DidvanIconButton(
icon: DidvanIcons.send_solid,
onPressed: () {
_formKey.currentState!.reset();
state.sendMessage();
_formKey.currentState!.reset();
},
size: 32,
color: Theme.of(context).colorScheme.focusedBorder,

View File

@ -76,7 +76,10 @@ class LogoAppBar extends StatelessWidget implements PreferredSizeWidget {
: DidvanIcons.message_solid,
size: 32,
onPressed: () => Navigator.of(context)
.pushNamed(Routes.directList),
.pushNamed(Routes.directList)
.then(
(value) => state.init(),
),
),
if (state.unread > 0)
Positioned(