From e7792a71d108f9d1d7517e9955874a639e4c6b5b Mon Sep 17 00:00:00 2001 From: Fabian Freund Date: Wed, 1 Oct 2025 08:54:15 +0200 Subject: [PATCH] geckoview is inconsistent about title, lets bind to authority for now --- app/lib/features/geckoview/domain/providers/tab_state.dart | 4 ++-- app/lib/features/geckoview/domain/providers/tab_state.g.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/lib/features/geckoview/domain/providers/tab_state.dart b/app/lib/features/geckoview/domain/providers/tab_state.dart index e36dce74..d627f413 100644 --- a/app/lib/features/geckoview/domain/providers/tab_state.dart +++ b/app/lib/features/geckoview/domain/providers/tab_state.dart @@ -47,11 +47,11 @@ class TabStates extends _$TabStates { state[contentState.id] ?? TabState.$default(contentState.id); final url = Uri.parse(contentState.url); - // Determine title based on priority: new non-empty title > existing title if URL unchanged > new title + // Determine title based on priority: new non-empty title > existing title if URL authority unchanged > new title final String resolvedTitle; if (contentState.title.isNotEmpty) { resolvedTitle = contentState.title; - } else if (current.url == url) { + } else if (current.url.authority == url.authority) { resolvedTitle = current.title; } else { resolvedTitle = contentState.title; diff --git a/app/lib/features/geckoview/domain/providers/tab_state.g.dart b/app/lib/features/geckoview/domain/providers/tab_state.g.dart index ce3e8857..b8ebaf7e 100644 --- a/app/lib/features/geckoview/domain/providers/tab_state.g.dart +++ b/app/lib/features/geckoview/domain/providers/tab_state.g.dart @@ -41,7 +41,7 @@ final class TabStatesProvider } } -String _$tabStatesHash() => r'f3835029261f0e2594c804d0555a0db37171ddab'; +String _$tabStatesHash() => r'778242f0b67eb7646014d0df857a3a71de214c40'; abstract class _$TabStates extends $Notifier> { Map build();