mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-11-04 04:04:18 +00:00 
			
		
		
		
	Fix application settings on iOS
This commit is contained in:
		@@ -8,6 +8,7 @@ import 'package:comunic/ui/widgets/dialogs/auto_sized_dialog_content_widget.dart
 | 
			
		||||
import 'package:comunic/ui/widgets/new_password_input_widget.dart';
 | 
			
		||||
import 'package:comunic/ui/widgets/settings/header_spacer_section.dart';
 | 
			
		||||
import 'package:comunic/utils/account_utils.dart';
 | 
			
		||||
import 'package:comunic/utils/flutter_utils.dart';
 | 
			
		||||
import 'package:comunic/utils/intl_utils.dart';
 | 
			
		||||
import 'package:comunic/utils/ui_utils.dart';
 | 
			
		||||
import 'package:flutter/material.dart';
 | 
			
		||||
@@ -39,15 +40,19 @@ class _AccountSecuritySettingsScreenState
 | 
			
		||||
            ),
 | 
			
		||||
            SettingsTile(
 | 
			
		||||
              title: tr("Change your security questions"),
 | 
			
		||||
              subtitle: tr(
 | 
			
		||||
                  "Your security questions can be used to recover an access to your account when you loose your password..."),
 | 
			
		||||
              subtitle: isIOS
 | 
			
		||||
                  ? null
 | 
			
		||||
                  : tr(
 | 
			
		||||
                      "Your security questions can be used to recover an access to your account when you loose your password..."),
 | 
			
		||||
              onPressed: (_) => _changeSecurityQuestions(),
 | 
			
		||||
              subtitleMaxLines: 3,
 | 
			
		||||
            ),
 | 
			
		||||
            SettingsTile(
 | 
			
		||||
              title: tr("Disconnect all your devices"),
 | 
			
		||||
              subtitle: tr(
 | 
			
		||||
                  "Disconnect all your devices from Comunic, including the current one. Use this option if one of the device you use for Comunic was stolen."),
 | 
			
		||||
              subtitle: isIOS
 | 
			
		||||
                  ? null
 | 
			
		||||
                  : tr(
 | 
			
		||||
                      "Disconnect all your devices from Comunic, including the current one. Use this option if one of the device you use for Comunic was stolen."),
 | 
			
		||||
              onPressed: (_) => _disconnectAllDevices(),
 | 
			
		||||
              subtitleMaxLines: 6,
 | 
			
		||||
            ),
 | 
			
		||||
 
 | 
			
		||||
@@ -7,6 +7,7 @@ import 'package:comunic/ui/routes/settings/general_account_settings.dart';
 | 
			
		||||
import 'package:comunic/ui/routes/settings/notifications_settings.dart';
 | 
			
		||||
import 'package:comunic/ui/routes/tour_route.dart';
 | 
			
		||||
import 'package:comunic/ui/widgets/settings/header_spacer_section.dart';
 | 
			
		||||
import 'package:comunic/utils/flutter_utils.dart';
 | 
			
		||||
import 'package:comunic/utils/intl_utils.dart';
 | 
			
		||||
import 'package:comunic/utils/ui_utils.dart';
 | 
			
		||||
import 'package:flutter/material.dart';
 | 
			
		||||
@@ -184,7 +185,7 @@ class __AccountSettingsBodyState extends State<_AccountSettingsBody> {
 | 
			
		||||
                .map((f) => SettingsTile(
 | 
			
		||||
                      title: f.title,
 | 
			
		||||
                      leading: Icon(f.icon),
 | 
			
		||||
                      subtitle: f.subtitle,
 | 
			
		||||
                      subtitle: isIOS ? null : f.subtitle,
 | 
			
		||||
                      onPressed: (_) => _openSectionsAsNewRoute(f),
 | 
			
		||||
                      subtitleMaxLines: 3,
 | 
			
		||||
                    ))
 | 
			
		||||
 
 | 
			
		||||
@@ -2,6 +2,7 @@ import 'package:comunic/helpers/preferences_helper.dart';
 | 
			
		||||
import 'package:comunic/helpers/server_config_helper.dart';
 | 
			
		||||
import 'package:comunic/ui/widgets/async_screen_widget.dart';
 | 
			
		||||
import 'package:comunic/ui/widgets/settings/header_spacer_section.dart';
 | 
			
		||||
import 'package:comunic/utils/flutter_utils.dart';
 | 
			
		||||
import 'package:comunic/utils/intl_utils.dart';
 | 
			
		||||
import 'package:comunic/utils/ui_utils.dart';
 | 
			
		||||
import 'package:flutter/material.dart';
 | 
			
		||||
@@ -69,7 +70,7 @@ class _ApplicationSettingsState extends State<ApplicationSettings> {
 | 
			
		||||
          ),
 | 
			
		||||
          SettingsTile(
 | 
			
		||||
            title: tr("About this application"),
 | 
			
		||||
            subtitle: tr("Learn more about us"),
 | 
			
		||||
            subtitle: isIOS ? null : tr("Learn more about us"),
 | 
			
		||||
            onPressed: (_) => showAboutAppDialog(context),
 | 
			
		||||
          )
 | 
			
		||||
        ],
 | 
			
		||||
@@ -83,8 +84,10 @@ class _ApplicationSettingsState extends State<ApplicationSettings> {
 | 
			
		||||
          _PreferencesSettingsTile(
 | 
			
		||||
            preferencesKey: PreferencesKeyList.FORCE_MOBILE_MODE,
 | 
			
		||||
            title: tr("Force mobile mode"),
 | 
			
		||||
            subtitle: tr(
 | 
			
		||||
                "Force the smartphone mode of the application to be used, even when tablet mode could be used."),
 | 
			
		||||
            subtitle: isIOS
 | 
			
		||||
                ? null
 | 
			
		||||
                : tr(
 | 
			
		||||
                    "Force the smartphone mode of the application to be used, even when tablet mode could be used."),
 | 
			
		||||
            onChange: _updatedSettings,
 | 
			
		||||
            helper: _preferencesHelper,
 | 
			
		||||
          ),
 | 
			
		||||
@@ -130,7 +133,7 @@ class _PreferencesSettingsTile extends SettingsTile {
 | 
			
		||||
      onToggle: _doChange,
 | 
			
		||||
      switchValue: helper.getBool(preferencesKey),
 | 
			
		||||
      titleMaxLines: 2,
 | 
			
		||||
      subtitleMaxLines: 3,
 | 
			
		||||
      subtitleMaxLines: 4,
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user