Skip to content

Commit

Permalink
hotfix: add-to-widget for contacts also requires iOS 17; successor of #…
Browse files Browse the repository at this point in the history
…2498; moreover, remove some comments that get/got quickly outdated
  • Loading branch information
r10s committed Jan 9, 2025
1 parent 37246d4 commit 4d0e5e9
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions deltachat-ios/Controller/ContactDetailViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ class ContactDetailViewController: UITableViewController {
case .deleteChat:
return deleteChatCell
case .addToHomescreen:
// only relevant for iOS 15
return homescreenWidgetCell
}
case .sharedChats:
Expand Down Expand Up @@ -403,7 +402,6 @@ class ContactDetailViewController: UITableViewController {
tableView.deselectRow(at: indexPath, animated: false)
showDeleteChatConfirmationAlert()
case .addToHomescreen:
// only relevant for iOS 15
tableView.deselectRow(at: indexPath, animated: true)
toggleChatInHomescreenWidget()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,6 @@ extension GroupChatDetailViewController: UITableViewDelegate, UITableViewDataSou
case .copyToClipboard:
return copyToClipboardCell
case .addToHomescreen:
// relevant only for iOS 15+
return homescreenWidgetCell
}
}
Expand Down
2 changes: 1 addition & 1 deletion deltachat-ios/ViewModel/ContactDetailViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class ContactDetailViewModel {
}

chatActions = [.archiveChat]
if #available(iOS 15, *) {
if #available(iOS 17, *) {
chatActions.append(.addToHomescreen)
}
if !isDeviceTalk && !isSavedMessages {
Expand Down

0 comments on commit 4d0e5e9

Please sign in to comment.