diff --git a/lib/app/layouts/conversation_view/widgets/message/popup/message_popup.dart b/lib/app/layouts/conversation_view/widgets/message/popup/message_popup.dart index b5f881209..db316b15e 100644 --- a/lib/app/layouts/conversation_view/widgets/message/popup/message_popup.dart +++ b/lib/app/layouts/conversation_view/widgets/message/popup/message_popup.dart @@ -275,7 +275,7 @@ class _MessagePopupState extends OptimizedState with SingleTickerP style: context.textTheme.bodyLarge!.apply(color: context.theme.colorScheme.properOnSurface), ), ), - if (ss.isMinVenturaSync && message.isFromMe!) + if (ss.isMinVenturaSync && message.isFromMe! && ss.serverDetailsSync().item4 >= 148) PopupMenuItem( value: 6, child: Text( @@ -1118,7 +1118,7 @@ class _MessagePopupState extends OptimizedState with SingleTickerP ), ), ), - if (ss.isMinVenturaSync && message.isFromMe!) + if (ss.isMinVenturaSync && message.isFromMe! && ss.serverDetailsSync().item4 >= 148) Material( color: Colors.transparent, child: InkWell( diff --git a/lib/app/layouts/settings/settings_page.dart b/lib/app/layouts/settings/settings_page.dart index daa755cdc..0e5b940e5 100644 --- a/lib/app/layouts/settings/settings_page.dart +++ b/lib/app/layouts/settings/settings_page.dart @@ -181,31 +181,33 @@ class _SettingsPageState extends OptimizedState { trailing: nextIcon, ); }), - Container( - color: tileColor, - child: Padding( - padding: const EdgeInsets.only(left: 65.0), - child: SettingsDivider(color: context.theme.colorScheme.surfaceVariant), + if (ss.serverDetailsSync().item4 >= 205) + Container( + color: tileColor, + child: Padding( + padding: const EdgeInsets.only(left: 65.0), + child: SettingsDivider(color: context.theme.colorScheme.surfaceVariant), + ), ), - ), - SettingsTile( - backgroundColor: tileColor, - title: "Scheduled Messages", - subtitle: "Schedule your server to send a message in the future or at set intervals", - isThreeLine: true, - onTap: () { - ns.pushAndRemoveSettingsUntil( - context, - ScheduledMessagesPanel(), - (route) => route.isFirst, - ); - }, - trailing: nextIcon, - leading: const SettingsLeadingIcon( - iosIcon: CupertinoIcons.calendar_today, - materialIcon: Icons.schedule_send_outlined, + if (ss.serverDetailsSync().item4 >= 205) + SettingsTile( + backgroundColor: tileColor, + title: "Scheduled Messages", + subtitle: "Schedule your server to send a message in the future or at set intervals", + isThreeLine: true, + onTap: () { + ns.pushAndRemoveSettingsUntil( + context, + ScheduledMessagesPanel(), + (route) => route.isFirst, + ); + }, + trailing: nextIcon, + leading: const SettingsLeadingIcon( + iosIcon: CupertinoIcons.calendar_today, + materialIcon: Icons.schedule_send_outlined, + ), ), - ), ], ), SettingsHeader( diff --git a/lib/services/backend/settings/settings_service.dart b/lib/services/backend/settings/settings_service.dart index f916b5051..1aa66b294 100644 --- a/lib/services/backend/settings/settings_service.dart +++ b/lib/services/backend/settings/settings_service.dart @@ -103,6 +103,9 @@ class SettingsService extends GetxService { } } + Tuple4 serverDetailsSync() => + Tuple4(prefs.getInt("macos-version") ?? 11, prefs.getInt("macos-minor-version") ?? 0, prefs.getString("server-version") ?? "0.0.0", prefs.getInt("server-version-code") ?? 0); + Future get isMinSierra async { final val = await getServerDetails(); return val.item1 > 10 || (val.item1 == 10 && val.item2 > 11);