mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 13:26:16 +00:00
applying themes on the fly!! (to sessions already active)
added applySelectedTheme to sshhandler which will run applyselectedtheme on the terminalview if it exists added applyselectedtheme to apply the chosen theme in hostsmanager applying of the chosen theme on appear of any shell view made the tap target for sessions actually the whole list item fix undefined behaivour from modifying published values from background threads
This commit is contained in:
@@ -22,7 +22,7 @@ final class SSHTerminalDelegate: TerminalView, Sendable, @preconcurrency Termina
|
||||
print(getTerminal().backgroundColor)
|
||||
print(getTerminal().foregroundColor)
|
||||
|
||||
applyTheme(hostsManager.selectedTheme)
|
||||
applySelectedTheme()
|
||||
|
||||
DispatchQueue.main.async {
|
||||
Task {
|
||||
@@ -55,6 +55,11 @@ final class SSHTerminalDelegate: TerminalView, Sendable, @preconcurrency Termina
|
||||
}
|
||||
}
|
||||
|
||||
func applySelectedTheme() {
|
||||
guard let hostsManager else { return }
|
||||
applyTheme(hostsManager.selectedTheme)
|
||||
}
|
||||
|
||||
func applyTheme(_ theme: Theme) {
|
||||
getTerminal().installPalette(colors: theme.ansi)
|
||||
getTerminal().foregroundColor = theme.foreground
|
||||
|
||||
Reference in New Issue
Block a user