Cleanup previous PR

This commit is contained in:
Kovid Goyal
2026-04-30 09:23:22 +05:30
parent e15f11c31c
commit 79bf7ef1a4
4 changed files with 24 additions and 48 deletions

View File

@@ -758,8 +758,9 @@ func (dnd *dnd) on_drop_data(cmd DC) error {
}
}
pending := false
expecting := utils.NewSetWithItems(drop_status.accepted_mimes...)
for _, d := range dnd.drop_dests {
if !d.completed {
if !d.completed && expecting.Has(d.mime_type) {
pending = true
break
}

View File

@@ -233,8 +233,6 @@ func (dnd *dnd) run_loop() (err error) {
dnd.send_test_response(utils.IfElse(dnd.drop_status.is_remote_client, "True", "False"))
case "DROP_URI_LIST":
dnd.send_test_response(strings.Join(dnd.drop_status.uri_list, "|"))
case "CONFIRM_PENDING":
dnd.send_test_response(utils.IfElse(len(dnd.confirm_drop.overwrites) > 0, "True", "False"))
default:
dnd.send_test_response("UNKNOWN TEST COMMAND: " + string(cmd.Payload))
}

View File

@@ -52,10 +52,6 @@ func (dnd *dnd) render_screen() error {
lp.Println("Dragging data...")
return nil
}
if dnd.drop_status.reading_data {
lp.Println("Reading dropped data, please wait...")
return nil
}
y := 0
sz, _ := lp.ScreenSize()
render_paragraph := func(text string) {
@@ -84,6 +80,11 @@ func (dnd *dnd) render_screen() error {
return nil
}
if dnd.drop_status.reading_data {
lp.Println("Reading dropped data, please wait...")
return nil
}
if dnd.drop_status.in_window {
if dnd.drop_status.action == 0 {
render_paragraph("A drag is active. Drop it into one of the boxes below to perform that action on the dragged data. Available MIME types in the drag:")