generated from exteraGramPlugins/pluginBase
Message Logger: show logged edits and deletions from telegram-panel [no bump]
Publish plugin / publish (push) Successful in 4s
Publish plugin / publish (push) Successful in 4s
Keeps deleted messages (75% opacity, red icon-pack trash icon), restores logged messages deleted while away, reports deletions, and shows edit history as a mock chat (Edit history in the message menu, Open topic). Message links and history open as any signed-in account with access. Per-master API tokens; chat state synced per checked range with an hour's validity, cached in SQLite with a configurable lifetime. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
80f1d5e55c
commit
9b2f26a845
26 files changed
+2928
-112
No files matched your search
@@ -112,3 +112,42 @@ The official structured plugin format (Elyx/ElyxBuilder) is a real alternative t
|
||||
This repo's bundler instead compiles a normal multi-file `src/` project down to the one
|
||||
`.plugin` file the base engine already knows how to load, so the dev-server write/reload loop
|
||||
works from the first deploy with no extra on-device engine.
|
||||
|
||||
## Gotchas found on exteraGram 12.10.6 (message_logger)
|
||||
|
||||
- **Java number boxing.** A Python `int` passed where Java takes `Object`, or to an overloaded
|
||||
method, becomes a `Long` — even the result of `Integer.valueOf()`. Use `java.jint` /
|
||||
`jfloat` explicitly: `ArrayList<Integer>` for `TL_*_getMessages.id` (a `Long` there fails
|
||||
serialization on the network thread and the request silently never answers),
|
||||
`Paint.setColor` (an `int` otherwise picks the `setColor(long)` ColorSpace overload),
|
||||
reflective `Method.invoke` arguments, and replacing `param.args[i]` in hooks.
|
||||
- **Requests.** `client_utils.send_request` did not invoke the callback for these requests;
|
||||
`ConnectionsManager.getInstance(account).sendRequest(req, RequestDelegate)` with a
|
||||
`dynamic_proxy(RequestDelegate)` kept strongly referenced works (`src/tg.py`).
|
||||
- **Logs.** This device's logcat is silenced; `src/diag.py` mirrors to
|
||||
`…/files/exteraGram/exteraGram Files/message_logger/diag.log` (readable over `adb shell cat`).
|
||||
- **Deploys.** `devclient.py deploy --enable` only enables; an already enabled plugin needs a
|
||||
deploy without `--enable` (which reloads) to pick up a new build.
|
||||
- **Adding messages to an open chat.** Inserting into `ChatActivity.messages` directly (not in
|
||||
`messagesDict`) breaks later arrivals in that chat; the private
|
||||
`ChatActivity.processNewMessages(ArrayList, boolean)` places messages (also older ones) and
|
||||
keeps the app's dicts and adapter consistent.
|
||||
- **Cell height.** Changing a `ChatMessageCell`'s measured height grows its bubble; after the
|
||||
state behind it changes, `forceLayout()` the cell and `chatAdapter.notifyItemChanged(...)`,
|
||||
or the list keeps stale positions. Item animators reset cell alpha: scale it in a
|
||||
`setAlpha` before-hook instead of setting it once.
|
||||
- **Icon packs.** exteraGram applies icon packs through the activity's `ExteraResources`
|
||||
(`getDrawableForDensity`); the application context's plain `Resources` and
|
||||
`ColoredImageSpan(int)` give stock icons. Load drawables from
|
||||
`get_last_fragment().getParentActivity().getResources()`.
|
||||
- **Another account's chat.** `BaseFragment.setCurrentAccount(slot)` before `presentFragment`
|
||||
opens e.g. a `ChatActivity` as another signed-in account without switching accounts.
|
||||
- **Links.** Tapped links go through `org.telegram.messenger.browser.Browser.openUrl` (8 overloads,
|
||||
the second argument a `Uri` or `String`); `adb shell am start -d URL` needs `-p <package>`.
|
||||
- **Message menu rows.** `MenuItemData` items land in the menu's Plugins folder, and options
|
||||
added to `ChatActivity.fillMessageMenu`'s lists are dropped by exteraGram. A row in the main
|
||||
menu is an `ActionBarMenuSubItem` inserted into the built popup after `createMenu` (whose
|
||||
overloads call one another: insert once); `selectedObject` is the message.
|
||||
- **Topics as another account.** `ForumUtilities.openTopic` uses the presenting fragment's
|
||||
account; do its steps yourself (`TopicsController.findTopic`/`loadTopic`, `ChatActivity`
|
||||
with `setCurrentAccount` then `setThreadMessages`) — see `src/views/open_as.py`.
|
||||
Reference in new issue
Block a user