Skip to content

Commit

Permalink
Merge pull request #1597 from Automattic/lantean/fixing-crasher
Browse files Browse the repository at this point in the history
Fixing Crash
  • Loading branch information
jleandroperez authored Jun 6, 2024
2 parents fae3470 + 91d42bf commit b958e7f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Simplenote/Classes/SPNoteListViewController+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -700,10 +700,12 @@ extension SPNoteListViewController {

@objc
func restoreSelectedRowsAfterBackgrounding() {
if selectedNotesEnteringBackground.isEmpty == false {
selectRows(with: selectedNotesEnteringBackground)
selectedNotesEnteringBackground.removeAll()
guard let selectedNotesEnteringBackground, selectedNotesEnteringBackground.isEmpty == false else {
return
}

selectRows(with: selectedNotesEnteringBackground)
self.selectedNotesEnteringBackground = []
}

func selectRows(with indexPaths: [IndexPath]) {
Expand Down

0 comments on commit b958e7f

Please sign in to comment.