forked from farhoodlabs/paperclip
Fix mine inbox keyboard selection
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
isMineInboxTab,
|
||||
loadLastInboxTab,
|
||||
RECENT_ISSUES_LIMIT,
|
||||
resolveInboxSelectionIndex,
|
||||
saveLastInboxTab,
|
||||
shouldShowInboxSection,
|
||||
} from "./inbox";
|
||||
@@ -408,4 +409,11 @@ describe("inbox helpers", () => {
|
||||
expect(isMineInboxTab("unread")).toBe(false);
|
||||
expect(isMineInboxTab("all")).toBe(false);
|
||||
});
|
||||
|
||||
it("anchors Mine selection to the first available inbox row", () => {
|
||||
expect(resolveInboxSelectionIndex(-1, 3, true)).toBe(0);
|
||||
expect(resolveInboxSelectionIndex(-1, 3, false)).toBe(-1);
|
||||
expect(resolveInboxSelectionIndex(5, 3, true)).toBe(2);
|
||||
expect(resolveInboxSelectionIndex(1, 0, true)).toBe(-1);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user