mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-21 16:38:23 +01:00
Fix bug where active session ID is sometimes not persisted (#248)
This commit is contained in:
parent
b762df179f
commit
2f57a6e067
@ -1056,6 +1056,7 @@ func getNextId(ids []string, delId string) string {
|
||||
}
|
||||
|
||||
func SwitchScreenById(ctx context.Context, sessionId string, screenId string) (*ModelUpdate, error) {
|
||||
SetActiveSessionId(ctx, sessionId)
|
||||
txErr := WithTx(ctx, func(tx *TxWrap) error {
|
||||
query := `SELECT screenid FROM screen WHERE sessionid = ? AND screenid = ?`
|
||||
if !tx.Exists(query, sessionId, screenId) {
|
||||
|
Loading…
Reference in New Issue
Block a user