mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-11-03 19:54:12 +00:00 
			
		
		
		
	Can force to use mobile mode
This commit is contained in:
		@@ -11,12 +11,10 @@ import 'package:settings_ui/settings_ui.dart';
 | 
			
		||||
 | 
			
		||||
class ApplicationSettings extends StatefulWidget {
 | 
			
		||||
  @override
 | 
			
		||||
  _ApplicationSettingsState createState() =>
 | 
			
		||||
      _ApplicationSettingsState();
 | 
			
		||||
  _ApplicationSettingsState createState() => _ApplicationSettingsState();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
class _ApplicationSettingsState
 | 
			
		||||
    extends State<ApplicationSettings> {
 | 
			
		||||
class _ApplicationSettingsState extends State<ApplicationSettings> {
 | 
			
		||||
  PreferencesHelper _preferencesHelper;
 | 
			
		||||
 | 
			
		||||
  Future<void> _refresh() async {
 | 
			
		||||
@@ -31,7 +29,11 @@ class _ApplicationSettingsState
 | 
			
		||||
 | 
			
		||||
  Widget _buildSections() {
 | 
			
		||||
    return SettingsList(
 | 
			
		||||
      sections: [_buildAppearanceSection(), _buildGeneralSection()],
 | 
			
		||||
      sections: [
 | 
			
		||||
        _buildAppearanceSection(),
 | 
			
		||||
        _buildGeneralSection(),
 | 
			
		||||
        _buildDebugSection()
 | 
			
		||||
      ],
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@@ -61,6 +63,21 @@ class _ApplicationSettingsState
 | 
			
		||||
        ],
 | 
			
		||||
      );
 | 
			
		||||
 | 
			
		||||
  /// Debug section
 | 
			
		||||
  SettingsSection _buildDebugSection() => SettingsSection(
 | 
			
		||||
        title: tr("Debug features"),
 | 
			
		||||
        tiles: [
 | 
			
		||||
          _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."),
 | 
			
		||||
            onChange: _updatedSettings,
 | 
			
		||||
            helper: _preferencesHelper,
 | 
			
		||||
          ),
 | 
			
		||||
        ],
 | 
			
		||||
      );
 | 
			
		||||
 | 
			
		||||
  /// Apply new settings
 | 
			
		||||
  _updatedSettings() {
 | 
			
		||||
    setState(() {});
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user