generated from exteraGramPlugins/pluginBase
Message Logger: keep own deletions, remove from view, reset marks
Publish plugin / publish (push) Successful in 4s
Publish plugin / publish (push) Successful in 4s
- Delete dialog: "Keep message for myself" checkbox keeps your deletion on this device (marked deleted); unticked, the message is hidden and never restored. Already deleted messages get a plain "Remove from view" dialog (fixes the chat staying dimmed/touch-blocked after it). - "Reset deleted/edited marks" in the chat menu (Plugins) and, for all chats, in the plugin settings. - Fix restored text-only messages showing as empty bubbles (rich text wrappers like links lost their text); missing settings icons. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
bbe4a557a8
commit
0176f7099d
9 files changed
+586
-12
No files matched your search
@@ -23,10 +23,11 @@ UPDATES = ("TL_updateDeleteMessages", "TL_updateDeleteChannelMessages")
|
||||
|
||||
|
||||
class Deletes:
|
||||
def __init__(self, plugin, api, chats):
|
||||
def __init__(self, plugin, api, chats, dialog=None):
|
||||
self.plugin = plugin
|
||||
self.api = api
|
||||
self.chats = chats
|
||||
self.dialog = dialog # hooks/delete_dialog.DeleteDialog
|
||||
self.handles = []
|
||||
|
||||
def install(self):
|
||||
@@ -70,6 +71,12 @@ class Deletes:
|
||||
return
|
||||
account = int(field(param.thisObject, "currentAccount") or 0)
|
||||
dialog_id = int(args[3] or 0)
|
||||
kept = self.dialog.apply_choice(account, dialog_id, ids) if self.dialog else []
|
||||
if kept:
|
||||
self.chats.refresh_dialog(account, dialog_id, kept)
|
||||
ids = [i for i in ids if i not in kept]
|
||||
if not ids:
|
||||
return
|
||||
store.note_own_deletion(account, ids)
|
||||
store.forget_deleted(account, dialog_id, ids)
|
||||
|
||||
|
||||
Reference in new issue
Block a user