mirror of
https://github.com/ddworken/hishtory.git
synced 2025-06-12 08:06:53 +02:00
Fix control-K in offline mode for #80
This commit is contained in:
parent
f9da1bf8b6
commit
0b13a9705d
@ -1790,6 +1790,8 @@ func TestFish(t *testing.T) {
|
|||||||
testutils.CompareGoldens(t, out, "TestFish-table")
|
testutils.CompareGoldens(t, out, "TestFish-table")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO(ddworken): Run TestTui in online and offline mode
|
||||||
|
|
||||||
func TestTui(t *testing.T) {
|
func TestTui(t *testing.T) {
|
||||||
// Setup
|
// Setup
|
||||||
defer testutils.BackupAndRestore(t)()
|
defer testutils.BackupAndRestore(t)()
|
||||||
|
@ -496,7 +496,12 @@ func deleteHistoryEntry(ctx *context.Context, entry data.HistoryEntry) error {
|
|||||||
if r.Error != nil {
|
if r.Error != nil {
|
||||||
return r.Error
|
return r.Error
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete remotely
|
// Delete remotely
|
||||||
|
config := hctx.GetConf(ctx)
|
||||||
|
if config.IsOffline {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
dr := shared.DeletionRequest{
|
dr := shared.DeletionRequest{
|
||||||
UserId: data.UserId(hctx.GetConf(ctx).UserSecret),
|
UserId: data.UserId(hctx.GetConf(ctx).UserSecret),
|
||||||
SendTime: time.Now(),
|
SendTime: time.Now(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user