Little dumb fix to a bug on custom colors
Maybe this is not the best way... i'm still learning the code of NeoTerm but someone can use it for now
This commit is contained in:
parent
1a34e154da
commit
68b67eb1b4
@ -219,6 +219,7 @@ class NeoTermActivity : AppCompatActivity(), ServiceConnection, SharedPreference
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onTabAdded(tabSwitcher: TabSwitcher, index: Int, tab: Tab, animation: Animation) {
|
override fun onTabAdded(tabSwitcher: TabSwitcher, index: Int, tab: Tab, animation: Animation) {
|
||||||
|
update_colors()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onTabRemoved(tabSwitcher: TabSwitcher, index: Int, tab: Tab, animation: Animation) {
|
override fun onTabRemoved(tabSwitcher: TabSwitcher, index: Int, tab: Tab, animation: Animation) {
|
||||||
@ -344,6 +345,7 @@ class NeoTermActivity : AppCompatActivity(), ServiceConnection, SharedPreference
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
enterMain()
|
enterMain()
|
||||||
|
update_colors()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -781,4 +783,19 @@ class NeoTermActivity : AppCompatActivity(), ServiceConnection, SharedPreference
|
|||||||
switchToSession(tabSwitcher.getTab(nextIndex))
|
switchToSession(tabSwitcher.getTab(nextIndex))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun update_colors() {
|
||||||
|
// Simple fix to bug on custom color
|
||||||
|
Handler().postDelayed({
|
||||||
|
|
||||||
|
if (tabSwitcher.count > 0) {
|
||||||
|
val tab = tabSwitcher.selectedTab
|
||||||
|
if (tab is TermTab) {
|
||||||
|
tab.updateColorScheme()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user