Offlin33er commited on
Commit
557af70
·
verified ·
1 Parent(s): 3a68091

Fix: rename onPageStarted to onPageStart (correct GV API name), url non-null

Browse files
app/src/main/java/dev/nova/browser/TabManager.kt CHANGED
@@ -19,7 +19,8 @@ import java.io.File
19
  *
20
  * GeckoView does not expose canGoBack()/canGoForward() as polling methods —
21
  * navigation state arrives via NavigationDelegate callbacks, so we track it
22
- * here per tab. Loading state and progress arrive via ProgressDelegate.
 
23
  *
24
  * M1 session restore: open-tab URLs + the active tab index are persisted to
25
  * a JSON file on every tab change and on activity stop, and reloaded on cold
@@ -106,8 +107,8 @@ class TabManager(private val runtime: GeckoRuntime, private val context: Context
106
  }
107
  }
108
  session.progressDelegate = object : GeckoSession.ProgressDelegate {
109
- // GV 147 signature: url is nullable here.
110
- override fun onPageStarted(session: GeckoSession, url: String?) {
111
  loadingStates[tabId] = true
112
  progressStates[tabId] = 0
113
  }
 
19
  *
20
  * GeckoView does not expose canGoBack()/canGoForward() as polling methods —
21
  * navigation state arrives via NavigationDelegate callbacks, so we track it
22
+ * here per tab. Loading state and progress arrive via ProgressDelegate
23
+ * (onPageStart / onProgressChange / onPageStop, per the GV javadoc).
24
  *
25
  * M1 session restore: open-tab URLs + the active tab index are persisted to
26
  * a JSON file on every tab change and on activity stop, and reloaded on cold
 
107
  }
108
  }
109
  session.progressDelegate = object : GeckoSession.ProgressDelegate {
110
+ // GV 147: onPageStart(session, url: String) — non-null url.
111
+ override fun onPageStart(session: GeckoSession, url: String) {
112
  loadingStates[tabId] = true
113
  progressStates[tabId] = 0
114
  }