Skip to content

Commit 1ebfca5

Browse files
committed
fix: update subtitle when switching tabs
1 parent 16036f4 commit 1ebfca5

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

app/src/main/java/com/raival/compose/file/explorer/screen/main/tab/apps/AppsTab.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ class AppsTab : Tab() {
4040
requestHomeToolbarUpdate()
4141
}
4242

43+
override fun onTabStarted() {
44+
super.onTabStarted()
45+
requestHomeToolbarUpdate()
46+
}
47+
4348
fun fetchInstalledApps() {
4449
isLoading = true
4550
CoroutineScope(Dispatchers.IO).launch {

app/src/main/java/com/raival/compose/file/explorer/screen/main/tab/files/FilesTab.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@ class FilesTab(
142142
}
143143
}
144144

145-
override fun onTabResumed() {}
145+
override fun onTabResumed() {
146+
requestHomeToolbarUpdate()
147+
}
146148

147149
override fun onTabStopped() {}
148150

app/src/main/java/com/raival/compose/file/explorer/screen/main/tab/home/HomeTab.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ class HomeTab : Tab() {
3737

3838
val recentFileHolders = mutableStateListOf<RecentFileHolder>()
3939

40+
override fun onTabStarted() {
41+
super.onTabStarted()
42+
requestHomeToolbarUpdate()
43+
}
44+
4045
override fun onTabResumed() {
4146
super.onTabResumed()
4247
requestHomeToolbarUpdate()

0 commit comments

Comments
 (0)