Skip to content
This repository was archived by the owner on Jun 7, 2020. It is now read-only.

Commit c40f402

Browse files
committed
validate before checking for nil subscription
1 parent 3ef1e72 commit c40f402

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Rocket.Chat/Controllers/Base/Main/MainSplitViewControllerShortcuts.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,23 +127,23 @@ extension MainSplitViewController {
127127
}
128128

129129
@objc func shortcutUpload(_ command: UIKeyCommand) {
130-
guard chatViewController?.subscription != nil else {
130+
guard chatViewController?.subscription?.validated() != nil else {
131131
return
132132
}
133133

134134
chatViewController?.toggleUpload()
135135
}
136136

137137
@objc func shortcutRoomActions(_ command: UIKeyCommand) {
138-
guard chatViewController?.subscription != nil else {
138+
guard chatViewController?.subscription?.validated() != nil else {
139139
return
140140
}
141141

142142
chatViewController?.toggleActions()
143143
}
144144

145145
@objc func shortcutRoomMessageSearch(_ command: UIKeyCommand) {
146-
guard chatViewController?.subscription != nil else {
146+
guard chatViewController?.subscription?.validated() != nil else {
147147
return
148148
}
149149

0 commit comments

Comments
 (0)