native macOS codings agent orchestrator
6
fork

Configure Feed

Select the types of activity you want to include in your feed.

Keep row selection when command popovers close

onevcat 43c86c69 d3160d7e

+9 -9
+9 -9
supacode/Features/Settings/Views/RepositorySettingsView.swift
··· 402 402 get: { iconPickerCommandID == command.id }, 403 403 set: { isPresented in 404 404 if !isPresented { 405 - closePopoverAndRefocusName(for: command.id) 405 + closePopoverAndRestoreCommandFocus(for: command.id) 406 406 } 407 407 } 408 408 ), ··· 476 476 get: { commandEditorCommandID == command.id }, 477 477 set: { isPresented in 478 478 if !isPresented { 479 - closePopoverAndRefocusName(for: command.id) 479 + closePopoverAndRestoreCommandFocus(for: command.id) 480 480 } 481 481 } 482 482 ), ··· 673 673 ForEach(Self.symbolPresets, id: \.self) { symbol in 674 674 Button { 675 675 command.wrappedValue.systemImage = symbol 676 - closePopoverAndRefocusName(for: commandID) 676 + closePopoverAndRestoreCommandFocus(for: commandID) 677 677 } label: { 678 678 Image(systemName: symbol) 679 679 .frame(width: 24, height: 24) ··· 752 752 753 753 private func toggleIconEditor(for commandID: UserCustomCommand.ID) { 754 754 if iconPickerCommandID == commandID { 755 - closePopoverAndRefocusName(for: commandID) 755 + closePopoverAndRestoreCommandFocus(for: commandID) 756 756 return 757 757 } 758 758 iconPickerCommandID = commandID ··· 765 765 766 766 private func toggleCommandEditor(for commandID: UserCustomCommand.ID) { 767 767 if commandEditorCommandID == commandID { 768 - closePopoverAndRefocusName(for: commandID) 768 + closePopoverAndRestoreCommandFocus(for: commandID) 769 769 return 770 770 } 771 771 commandEditorCommandID = commandID ··· 791 791 focusedNameEditorCommandID = nil 792 792 } 793 793 794 - private func closePopoverAndRefocusName(for commandID: UserCustomCommand.ID) { 794 + private func closePopoverAndRestoreCommandFocus(for commandID: UserCustomCommand.ID) { 795 795 popoverRefocusTask?.cancel() 796 796 797 797 var transaction = Transaction() ··· 801 801 commandEditorCommandID = nil 802 802 } 803 803 focusCustomCommandsArea() 804 - scheduleNameRefocus(for: commandID) 804 + scheduleCommandFocusRestore(for: commandID) 805 805 } 806 806 807 807 private func focusCustomCommandsArea() { ··· 817 817 _ = window.makeFirstResponder(nil) 818 818 } 819 819 820 - private func scheduleNameRefocus(for commandID: UserCustomCommand.ID) { 820 + private func scheduleCommandFocusRestore(for commandID: UserCustomCommand.ID) { 821 821 popoverRefocusTask = Task { @MainActor in 822 822 await Task.yield() 823 823 guard !Task.isCancelled else { ··· 834 834 transaction.animation = nil 835 835 withTransaction(transaction) { 836 836 selectCustomCommand(commandID) 837 - beginNameEditing(for: commandID) 837 + endNameEditing() 838 838 } 839 839 } 840 840 }