gate android branches of window_manager

This commit is contained in:
Henry Hiles 2026-10-22 17:31:43 -04:00
commit e0b5dc58d0
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs
2 changed files with 9 additions and 4 deletions

View file

@ -88,7 +88,8 @@ class UnifiedPushController extends AsyncNotifier<String?> {
if (notification == null ||
(!isInBackground &&
(WindowManager.instance.getCurrent()?.isFocused ?? true) &&
(!Platform.isAndroid &&
(WindowManager.instance.getCurrent()?.isFocused ?? true)) &&
ref.read(SelectedRoomController.provider) ==
notification.roomId)) {
if (isInBackground) exit(0);

View file

@ -23,6 +23,8 @@ final class const Appbar({
@override
Widget build(BuildContext context, WidgetRef ref) {
final isDesktop = !(Platform.isAndroid || Platform.isIOS);
void maximize() {
final window = WindowManager.instance.getCurrent();
if (window == null) return;
@ -38,7 +40,7 @@ final class const Appbar({
onPanStart: ref
.watch(SettingsController.provider)
.whenOrNull(
data: (settings) => settings.linuxMobileMode
data: (settings) => !isDesktop || settings.linuxMobileMode
? null
: (_) => WindowManager.instance.getCurrent()?.startDragging(),
),
@ -51,10 +53,12 @@ final class const Appbar({
onTap: onTap,
child: IgnorePointer(child: title),
),
flexibleSpace: GestureDetector(onDoubleTap: maximize),
flexibleSpace: GestureDetector(
onDoubleTap: isDesktop ? maximize : null,
),
actions: [
...actions,
if (windowControls && !(Platform.isAndroid || Platform.isIOS)) ...[
if (windowControls && isDesktop) ...[
if (ref
.watch(SettingsController.provider)
.whenOrNull(