Skip to content

Commit

Permalink
Make sure that unpinned items are shown after search field when deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
p0deje committed Aug 1, 2021
1 parent 4b3df6c commit 3a83468
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Maccy/Menu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ class Menu: NSMenu, NSMenuDelegate {
private func showAllUnpinnedItems() {
for historyItem in indexedItems.flatMap({ $0.menuItems }).filter({ !$0.isPinned }) {
if !historyMenuItems.contains(historyItem) {
insertItem(historyItem, at: historyMenuItems.count)
insertItem(historyItem, at: historyMenuItems.count + historyMenuItemOffset)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion MaccyUITests/MaccyUITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ class MaccyUITests: XCTestCase {
search(copy2)
app.typeKey(.delete, modifierFlags: [.option])
XCTAssertFalse(app.menuItems[copy2].exists)
XCTAssertTrue(app.menuItems["Clear"].firstMatch.isSelected)
XCTAssertTrue(app.menuItems[copy1].firstMatch.isSelected)

app.typeKey(.escape, modifierFlags: [])
popUpWithHotkey()
Expand Down

0 comments on commit 3a83468

Please sign in to comment.