diff --git a/assets/translations/strings_en.i18n.json b/assets/translations/strings_en.i18n.json index 97d055ba..d430c9e3 100644 --- a/assets/translations/strings_en.i18n.json +++ b/assets/translations/strings_en.i18n.json @@ -322,7 +322,7 @@ "experimentalNotice": "Experimental Features In Use", "experimentalNoticeMsg": "You've enabled some experimental features which might affect connection quality and cause unexpected errors. You can always change or reset these options from Config options page.", "disableExperimentalNotice": "Don't Show Again", - "reconnectMsg": "Reconnect for Changes to Take Effect" + "reconnectMsg": "Reconnecting for taking into account the changes..." }, "config": { "resetBtn": "Reset Options", diff --git a/assets/translations/strings_fa.i18n.json b/assets/translations/strings_fa.i18n.json index 737fc28a..603beb8e 100644 --- a/assets/translations/strings_fa.i18n.json +++ b/assets/translations/strings_fa.i18n.json @@ -322,7 +322,7 @@ "experimentalNotice": "ویژگی‌های آزمایشی در حال استفاده", "experimentalNoticeMsg": "شما برخی از ویژگی‌های آزمایشی را فعال کرده‌اید که ممکن است بر کیفیت اتصال تأثیر گذاشته و باعث بروز خطاهای غیرمنتظره شود. شما همیشه می‌توانید این گزینه‌ها را از صفحه‌ی تنظیمات پیکربندی تغییر دهید یا بازنشانی کنید.", "disableExperimentalNotice": "دیگر نشان نده", - "reconnectMsg": "دوباره متصل شوید تا تغییرات اعمال شوند" + "reconnectMsg": "در حال اتصال مجدد برای اعمال تغییرات..." }, "config": { "resetBtn": "بازنشانی تنظیمات", diff --git a/lib/features/connection/widget/connection_wrapper.dart b/lib/features/connection/widget/connection_wrapper.dart index 62587747..ce148472 100644 --- a/lib/features/connection/widget/connection_wrapper.dart +++ b/lib/features/connection/widget/connection_wrapper.dart @@ -13,12 +13,10 @@ class ConnectionWrapper extends StatefulHookConsumerWidget { final Widget child; @override - ConsumerState createState() => - _ConnectionWrapperState(); + ConsumerState createState() => _ConnectionWrapperState(); } -class _ConnectionWrapperState extends ConsumerState - with AppLogger { +class _ConnectionWrapperState extends ConsumerState with AppLogger { @override Widget build(BuildContext context) { ref.listen(connectionNotifierProvider, (_, __) {}); @@ -26,16 +24,16 @@ class _ConnectionWrapperState extends ConsumerState ref.listen(configOptionNotifierProvider, (previous, next) async { if (next case AsyncData(value: true)) { final t = ref.read(translationsProvider); + ref.watch(inAppNotificationControllerProvider).showInfoToast( + t.connection.reconnectMsg, + // actionText: t.connection.reconnect, + // callback: () async { + // await ref + // .read(connectionNotifierProvider.notifier) + // .reconnect(await ref.read(activeProfileProvider.future)); + // }, + ); await ref.read(connectionNotifierProvider.notifier).reconnect(await ref.read(activeProfileProvider.future)); - // ref.watch(inAppNotificationControllerProvider).showActionToast( - // t.connection.reconnectMsg, - // actionText: t.connection.reconnect, - // callback: () async { - // await ref - // .read(connectionNotifierProvider.notifier) - // .reconnect(await ref.read(activeProfileProvider.future)); - // }, - // ); } });