Fix control-K in offline mode for #80

This commit is contained in:
David Dworken 2023-04-30 08:50:17 -07:00
parent f9da1bf8b6
commit 0b13a9705d
No known key found for this signature in database
2 changed files with 7 additions and 0 deletions

View File

@ -1790,6 +1790,8 @@ func TestFish(t *testing.T) {
testutils.CompareGoldens(t, out, "TestFish-table")
}
// TODO(ddworken): Run TestTui in online and offline mode
func TestTui(t *testing.T) {
// Setup
defer testutils.BackupAndRestore(t)()

View File

@ -496,7 +496,12 @@ func deleteHistoryEntry(ctx *context.Context, entry data.HistoryEntry) error {
if r.Error != nil {
return r.Error
}
// Delete remotely
config := hctx.GetConf(ctx)
if config.IsOffline {
return nil
}
dr := shared.DeletionRequest{
UserId: data.UserId(hctx.GetConf(ctx).UserSecret),
SendTime: time.Now(),