diff options
| author | Lena <lena@omega> | 2026-08-23 00:00:00 +0000 |
|---|---|---|
| committer | Lena <lena@omega> | 2026-08-23 00:00:00 +0000 |
| commit | 0c653418a67fe960bb3126559fe77833faaa385c (patch) | |
| tree | 6db0f168c62ec29d3f5ccb64845d781b2fa80e79 /app/src/main/res/mipmap-anydpi-v26 | |
| parent | dc0338f8c0c9e74b277169d812c432f7ea4888e3 (diff) | |
| download | rsend-0c653418a67fe960bb3126559fe77833faaa385c.tar.gz | |
app: remove duplicated and dead code
upgradeLegacy assembled every remote, folder and schedule twice: once as
Remote and Folder objects to validate, and again as a parallel JSON tree
to return. Build the objects and serialise them, and drop the dead
endpointAllowed branch, the redundant pin emptiness test, and the
excludes length pre-check that excludesAllowed already makes.
atomicWrite existed verbatim in Config and Keys and was open-coded a
third time in LastSync, which then reached into Config's companion for
the bounded reader. The same bounded read was open-coded twice more, for
the encrypted key and for an imported one. Both are plain file
operations on the same private directory and belong in one place, with
readText a thin wrapper over readBytes.
Generating and importing an identity key ran the same twenty lines of
worker thread, error capture, refresh, toast and dialog; only the action
and two strings differed. rotateIfBig rotated at length >= MAX_BYTES,
which line() already subsumes, and its only caller invoked it
immediately before a line(). notifyError and notifyDeleted were the same
builder twice. openSettings nested a try/catch and repeated one toast;
take the candidates as a vararg. RemoteActivity.save defaulted its
argument to current(), which validates and writes the status field, so
the default hid that side effect from one of two callers.
Dead on arrival: Outcome.deleted's default, which no caller omits; the
rsa-sha2-* arms of hostKeyFile, since rsh prints PublicKey.Type() and an
RSA host key is always ssh-rsa; and the limit <= 0 branch in
SyncLog.text, which tail already handles and handled more accurately.
The config recovery note is now written with an explicit charset like
every other write here.
Diffstat (limited to 'app/src/main/res/mipmap-anydpi-v26')
0 files changed, 0 insertions, 0 deletions