You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Update Light theme color palette for better contrast
- Implement manual WebView directory initialization
- Add unit test for navigation logic
- Enable configurable toolbar positioning
- Add home button to address bar component
- Fix emulator-specific high refresh rate issue
if (extracted !=null&& extracted.contentText.isNotBlank()) {
235
+
_readerArticle.value = extracted
236
+
openSheet(ActiveSheet.READER_MODE)
237
+
} else {
238
+
// Fallback article if extraction returns sparse text
239
+
val fallback =ReaderArticle(
240
+
title = currentTab.title,
241
+
domain =UrlUtils.extractDomain(currentTab.url),
242
+
contentText ="Unable to extract formatted article content for this page. The page may not contain long-form text or may be an interactive web application.",
243
+
wordCount =25,
244
+
readingTimeMinutes =1
245
+
)
246
+
_readerArticle.value = fallback
247
+
openSheet(ActiveSheet.READER_MODE)
248
+
}
249
+
},
250
+
targetTabId = tabId
251
+
))
252
+
}
253
+
}
205
254
206
255
// Weather Repository & UI State Flow
207
256
val weatherRepository =WeatherRepository(application)
@@ -452,6 +501,22 @@ class BrowserViewModel(application: Application) : AndroidViewModel(application)
452
501
dismissSheet()
453
502
}
454
503
504
+
funswitchToNextProfile() {
505
+
val list = profiles.value
506
+
if (list.size <=1) return
507
+
val currentIndex = list.indexOfFirst { it.id ==_currentProfileId.value }
508
+
val nextIndex =if (currentIndex >=0) (currentIndex +1) % list.size else0
509
+
switchProfile(list[nextIndex].id)
510
+
}
511
+
512
+
funswitchToPrevProfile() {
513
+
val list = profiles.value
514
+
if (list.size <=1) return
515
+
val currentIndex = list.indexOfFirst { it.id ==_currentProfileId.value }
516
+
val prevIndex =if (currentIndex >0) currentIndex -1else list.size -1
517
+
switchProfile(list[prevIndex].id)
518
+
}
519
+
455
520
funtogglePrivateMode() {
456
521
val newPrivate =!_isPrivateMode.value
457
522
_isPrivateMode.value = newPrivate
@@ -690,19 +755,41 @@ class BrowserViewModel(application: Application) : AndroidViewModel(application)
0 commit comments