Skip to content

Commit

Permalink
fix: correct view tab
Browse files Browse the repository at this point in the history
  • Loading branch information
bdlukaa committed Oct 25, 2023
1 parent abedccf commit fc7957c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/providers/settings_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ class SettingsProvider extends ChangeNotifier {
systemLocale,
);
_snoozedUntil =
DateTime.tryParse(data[kHiveSnoozedUntil]) ?? defaultSnoozedUntil;
DateTime.tryParse((data[kHiveSnoozedUntil] as String?) ?? '') ??
defaultSnoozedUntil;
_notificationClickBehavior = NotificationClickBehavior.values[
data[kHiveNotificationClickBehavior] ??
kDefaultNotificationClickBehavior.index];
Expand Down
7 changes: 6 additions & 1 deletion lib/widgets/device_grid/mobile/mobile_device_grid.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,12 @@ class _MobileDeviceGridState extends State<MobileDeviceGrid> {
child: PageTransitionSwitcher(
child: view.devices.keys
.map((key) => _MobileDeviceGridChild(tab: key))
.elementAt(view.tab.clamp(0, view.devices.length - 1)),
.elementAt(
view.devices.keys
.toList()
.indexOf(view.tab)
.clamp(0, view.devices.length - 1),
),
transitionBuilder: (child, primaryAnimation, secondaryAnimation) {
return FadeThroughTransition(
animation: primaryAnimation,
Expand Down
7 changes: 6 additions & 1 deletion windows/flutter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ include(${EPHEMERAL_DIR}/generated_config.cmake)
# https://github.com/flutter/flutter/issues/57146.
set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper")

# Set fallback configurations for older versions of the flutter tool.
if (NOT DEFINED FLUTTER_TARGET_PLATFORM)
set(FLUTTER_TARGET_PLATFORM "windows-x64")
endif()

# === Flutter Library ===
set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll")

Expand Down Expand Up @@ -92,7 +97,7 @@ add_custom_command(
COMMAND ${CMAKE_COMMAND} -E env
${FLUTTER_TOOL_ENVIRONMENT}
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
windows-x64 $<CONFIG>
${FLUTTER_TARGET_PLATFORM} $<CONFIG>
VERBATIM
)
add_custom_target(flutter_assemble DEPENDS
Expand Down

0 comments on commit fc7957c

Please sign in to comment.