Skip to content

Commit 23a377b

Browse files
popup msg for restore items (#4116)
1 parent 457f384 commit 23a377b

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

js/activity.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3222,7 +3222,19 @@ class Activity {
32223222
* Repositions blocks about trash area
32233223
*/
32243224
const restoreTrash = (activity) => {
3225+
if (!activity.blocks || !activity.blocks.trashStacks || activity.blocks.trashStacks.length === 0) {
3226+
activity.textMsg(
3227+
_("Nothing in the trash to restore."),
3228+
3000
3229+
);
3230+
return;
3231+
}
32253232
activity._restoreTrash();
3233+
activity.textMsg(
3234+
_("Item restored from the trash."),
3235+
3000
3236+
);
3237+
32263238
if (docById("helpfulWheelDiv").style.display !== "none") {
32273239
docById("helpfulWheelDiv").style.display = "none";
32283240
activity.__tick();
@@ -7062,4 +7074,4 @@ define(MYDEFINES, (compatibility) =>{
70627074
activity.setupDependencies();
70637075
activity.doContextMenus();
70647076
activity.doPluginsAndPaletteCols();
7065-
});
7077+
});

0 commit comments

Comments
 (0)