mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-23 23:50:36 +00:00
Fix #1855
This commit is contained in:
parent
1c1a612d56
commit
f758b672f1
1 changed files with 10 additions and 7 deletions
|
@ -220,21 +220,24 @@ extension StatusEditor {
|
|||
switch mode {
|
||||
case .new, .replyTo, .quote, .mention, .shareExtension:
|
||||
postStatus = try await client.post(endpoint: Statuses.postStatus(json: data))
|
||||
if let postStatus {
|
||||
StreamWatcher.shared.emmitPostEvent(for: postStatus)
|
||||
}
|
||||
case let .edit(status):
|
||||
postStatus = try await client.put(endpoint: Statuses.editStatus(id: status.id, json: data))
|
||||
if let postStatus {
|
||||
StreamWatcher.shared.emmitEditEvent(for: postStatus)
|
||||
}
|
||||
}
|
||||
|
||||
postingTimer?.invalidate()
|
||||
postingTimer = nil
|
||||
|
||||
if let postStatus {
|
||||
withAnimation {
|
||||
postingProgress = 99.0
|
||||
}
|
||||
try await Task.sleep(for: .seconds(0.5))
|
||||
StreamWatcher.shared.emmitEditEvent(for: postStatus)
|
||||
HapticManager.shared.fireHaptic(.notification(.success))
|
||||
withAnimation {
|
||||
postingProgress = 99.0
|
||||
}
|
||||
try await Task.sleep(for: .seconds(0.5))
|
||||
HapticManager.shared.fireHaptic(.notification(.success))
|
||||
|
||||
if hasExplicitlySelectedLanguage, let selectedLanguage {
|
||||
preferences?.markLanguageAsSelected(isoCode: selectedLanguage)
|
||||
|
|
Loading…
Reference in a new issue