Repository navigation
feat(drawer): hide and unhide sessions - #217
Merged
Merged
Conversation
Ports iOS fe22dea2. Holding a row and choosing Hide in the selection bar's overflow menu takes the session out of the drawer (Pinned and Recents); it still turns up in search, where Unhide brings it back. Hidden sessions are phone-local and per server (SharedKeys.hiddenSessionKeys, hidden-sessions.json) and are forgotten when the session is deleted. Rows also get a Hide/Unhide TalkBack action and a "Hidden" state. Verified: ported hiddenSessionsLeaveTheListButStayInSearch fails without the visibleSessions filter and passes with it; full scripts/check.sh on the VM; checked on the emulator with session-lab.
… hidden IDs once The selection bar looked up the chosen sessions in the loaded list only, so a session found by server search but not loaded got no action: Unhide (and Mute, Pin, Mark as Read/Unread, Archive) cleared the selection and did nothing. It now reads visibleSessions, which includes those results; the reducer already adopts them. Ports iOS 42c10069: hiddenSessionIDs works out this server's hidden IDs once per pass, so visibleSessions and DrawerListModel.build no longer build server.persistenceID per session. Ports hiddenSessionsMatchTheirKeys from d535eda4. Parity rows for the list model, row cell, selection bar and test counts mention Hide/Unhide. Verified: unhidingAServerResultFromTheSelectionUnhidesIt fails without the fix and passes with it; full scripts/check.sh on the VM; on the emulator against session-lab, Hide from the ⋮ menu, find by search, Unhide from the search result.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports iOS fe22dea2: a session's ⋮ menu (and TalkBack actions) can now Hide or Unhide it. Hidden sessions leave Pinned and Recents but still show up in search, where they can be unhidden. Hidden keys are stored per server in
hidden-sessions.jsonand removed when a session is purged.The selection bar now looks up the chosen sessions in what the drawer shows, so its actions also reach a session that only server search found. Before, Hide/Unhide (and the existing Mute, Pin, Mark as Read/Unread and Archive) cleared the selection and did nothing for such a row. It also ports iOS 42c10069:
hiddenSessionIDsworks out this server's hidden IDs once per list build instead of a key per session.Tests: the iOS tests
hiddenSessionsLeaveTheListButStayInSearchandhiddenSessionsMatchTheirKeysare ported, plusunhidingAServerResultFromTheSelectionUnhidesItfor the search-only row. The first and last fail without their fixes.Verified:
scripts/check.shon the VM. On the emulator against session-lab, I hid a session, saw it leave Recents, found it by search, and unhid it from there. The lab loads every session at once, so the search-only case is covered by the unit test only.Two windows on a tablet each keep their own copy of the hidden set until reopened, as mutes and pins already do.