diff --git a/lib/feature/display/cubit/display_cubit.dart b/lib/feature/display/cubit/display_cubit.dart index 78108a9..29d6f0f 100644 --- a/lib/feature/display/cubit/display_cubit.dart +++ b/lib/feature/display/cubit/display_cubit.dart @@ -212,7 +212,7 @@ class DisplayCubit extends Cubit with Logger { double bestHeight = maxHeight; double minEmptySpace = maxWidth * maxHeight; - for (double height = maxHeight; height >= 320; height -= 16) { + for (double height = maxHeight; height >= 320; height -= 32) { double width = height * aspectRatio; if (width > maxWidth) { @@ -223,7 +223,7 @@ class DisplayCubit extends Cubit with Logger { continue; } - width = (width ~/ 16) * 16; + width = (width ~/ 32) * 32; double emptySpace = (maxWidth - width) * (maxHeight - height); diff --git a/lib/feature/releaseNotes/repository/release_notes_repository.dart b/lib/feature/releaseNotes/repository/release_notes_repository.dart index aa4d854..bf2e14d 100644 --- a/lib/feature/releaseNotes/repository/release_notes_repository.dart +++ b/lib/feature/releaseNotes/repository/release_notes_repository.dart @@ -7,7 +7,24 @@ import 'package:tesla_android/feature/releaseNotes/model/version.dart'; class ReleaseNotesRepository { static const ReleaseNotes _releaseNotes = ReleaseNotes(versions: [ Version( - versionName: "2023.42.1", + versionName: "2023.48.1", + changelogItems: [ + ChangelogItem( + title: "Wi-Fi Hotspot", + shortDescription: "Bugfix", + descriptionMarkdown: + "Some users unintentionally disabled the Hotspot without using a 3rd party router. The ability to disable the broadcasting has been removed in this version since it does not make a lot of sense with the current networking setup that does not rely on using a public IP range in the DHCP server.", + ), + ChangelogItem( + title: "Android Platform", + shortDescription: "Security improvements", + descriptionMarkdown: + "The platform has been updated to the latest Android 13 release", + ), + ], + ), + Version( + versionName: "2023.45.1", changelogItems: [ ChangelogItem( title: "SSL certificate reneval", diff --git a/lib/feature/settings/widget/hotspot_settings.dart b/lib/feature/settings/widget/hotspot_settings.dart index 2237b37..d9d3fb1 100644 --- a/lib/feature/settings/widget/hotspot_settings.dart +++ b/lib/feature/settings/widget/hotspot_settings.dart @@ -70,89 +70,88 @@ class HotspotSettings extends SettingsSection { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ + // SettingsTile( + // icon: Icons.wifi, + // title: 'Wi-Fi Hotspot', + // subtitle: + // 'Disable only if you use and external router and you don\'t need the Tesla Android Wi-Fi network', + // trailing: Switch( + // value: isSoftApEnabled, + // onChanged: (value) { + // cubit.updateSoftApState(value); + // })), + // divider, + + SettingsTile( + icon: Icons.wifi_channel, + title: 'Frequency band', + trailing: DropdownButton( + value: selectedBand, + icon: const Icon(Icons.arrow_drop_down_outlined), + underline: Container( + height: 2, + color: Theme.of(context).primaryColor, + ), + onChanged: (SoftApBandType? value) { + if (value != null) { + cubit.updateSoftApBand(value); + } + }, + items: SoftApBandType.values + .map>( + (SoftApBandType value) { + return DropdownMenuItem( + value: value, + child: Text(value.name), + ); + }).toList(), + )), + const Padding( + padding: EdgeInsets.all(TADimens.PADDING_S_VALUE), + child: Text( + 'The utilization of the 5 GHz operation mode enhances the performance of the Tesla Android system while effectively resolving Bluetooth-related challenges. This mode is anticipated to be designated as the default option in a future versions.\n\nConversely, when operating on the 2.4 GHz frequency, the allocation of resources between the hotspot and Bluetooth can lead to dropped frames, particularly when utilizing AD2P audio.'), + ), + divider, SettingsTile( - icon: Icons.wifi, - title: 'Wi-Fi Hotspot', - subtitle: - 'Disable only if you use and external router and you don\'t need the Tesla Android Wi-Fi network', + icon: Icons.wifi_off, + title: 'Offline mode', + subtitle: 'Persistent Wi-Fi connection', trailing: Switch( - value: isSoftApEnabled, + value: isOfflineModeEnabled, onChanged: (value) { - cubit.updateSoftApState(value); + cubit.updateOfflineModeState(value); })), divider, - if (isSoftApEnabled) ...[ - SettingsTile( - icon: Icons.wifi_channel, - title: 'Frequency band', - trailing: DropdownButton( - value: selectedBand, - icon: const Icon(Icons.arrow_drop_down_outlined), - underline: Container( - height: 2, - color: Theme.of(context).primaryColor, - ), - onChanged: (SoftApBandType? value) { - if (value != null) { - cubit.updateSoftApBand(value); - } - }, - items: SoftApBandType.values - .map>( - (SoftApBandType value) { - return DropdownMenuItem( - value: value, - child: Text(value.name), - ); - }).toList(), - )), - const Padding( - padding: EdgeInsets.all(TADimens.PADDING_S_VALUE), - child: Text( - 'The utilization of the 5 GHz operation mode enhances the performance of the Tesla Android system while effectively resolving Bluetooth-related challenges. This mode is anticipated to be designated as the default option in a future versions.\n\nConversely, when operating on the 2.4 GHz frequency, the allocation of resources between the hotspot and Bluetooth can lead to dropped frames, particularly when utilizing AD2P audio.'), - ), - divider, - SettingsTile( - icon: Icons.wifi_off, - title: 'Offline mode', - subtitle: 'Persistent Wi-Fi connection', - trailing: Switch( - value: isOfflineModeEnabled, - onChanged: (value) { - cubit.updateOfflineModeState(value); - })), - divider, - const Padding( - padding: EdgeInsets.all(TADimens.PADDING_S_VALUE), - child: Text( - 'To ensure continuous internet access, your Tesla vehicle relies on Wi-Fi networks that have an active internet connection. However, if you encounter a situation where Wi-Fi connectivity is unavailable, there is a solution called "offline mode" to address this limitation. In offline mode, certain features like Tesla Mobile App access and other car-side functionalities that rely on internet connectivity will be disabled. To overcome this limitation, you can establish internet access in your Tesla Android setup by using an LTE Modem or enabling tethering.'), - ), - divider, - SettingsTile( - icon: Icons.data_thresholding_sharp, - title: 'Tesla Telemetry', - subtitle: 'Reduces data usage, uncheck to disable', - trailing: Switch( - value: isOfflineModeTelemetryEnabled, - onChanged: (value) { - cubit.updateOfflineModeTelemetryState(value); - })), - divider, - SettingsTile( - icon: Icons.update, - title: 'Tesla Software Updates', - subtitle: 'Reduces data usage, uncheck to disable', - trailing: Switch( - value: isOfflineModeTeslaFirmwareDownloadsEnabled, - onChanged: (value) { - cubit.updateOfflineModeTeslaFirmwareDownloadsState(value); - })), - const Padding( - padding: EdgeInsets.all(TADimens.PADDING_S_VALUE), - child: Text( - 'Your car will still be able to check the availability of new updates. With this option enabled they won\'t immediately start downloading'), - ), - ], + const Padding( + padding: EdgeInsets.all(TADimens.PADDING_S_VALUE), + child: Text( + 'To ensure continuous internet access, your Tesla vehicle relies on Wi-Fi networks that have an active internet connection. However, if you encounter a situation where Wi-Fi connectivity is unavailable, there is a solution called "offline mode" to address this limitation. In offline mode, certain features like Tesla Mobile App access and other car-side functionalities that rely on internet connectivity will be disabled. To overcome this limitation, you can establish internet access in your Tesla Android setup by using an LTE Modem or enabling tethering.'), + ), + divider, + SettingsTile( + icon: Icons.data_thresholding_sharp, + title: 'Tesla Telemetry', + subtitle: 'Reduces data usage, uncheck to disable', + trailing: Switch( + value: isOfflineModeTelemetryEnabled, + onChanged: (value) { + cubit.updateOfflineModeTelemetryState(value); + })), + divider, + SettingsTile( + icon: Icons.update, + title: 'Tesla Software Updates', + subtitle: 'Reduces data usage, uncheck to disable', + trailing: Switch( + value: isOfflineModeTeslaFirmwareDownloadsEnabled, + onChanged: (value) { + cubit.updateOfflineModeTeslaFirmwareDownloadsState(value); + })), + const Padding( + padding: EdgeInsets.all(TADimens.PADDING_S_VALUE), + child: Text( + 'Your car will still be able to check the availability of new updates. With this option enabled they won\'t immediately start downloading'), + ), ], ); } diff --git a/pubspec.yaml b/pubspec.yaml index 2de848c..634863a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: Tesla Android publish_to: 'none' -version: 2023.45.1 +version: 2023.48.1 environment: flutter: "3.13.3"