mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-01-11 16:45:27 +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 {
|
switch mode {
|
||||||
case .new, .replyTo, .quote, .mention, .shareExtension:
|
case .new, .replyTo, .quote, .mention, .shareExtension:
|
||||||
postStatus = try await client.post(endpoint: Statuses.postStatus(json: data))
|
postStatus = try await client.post(endpoint: Statuses.postStatus(json: data))
|
||||||
|
if let postStatus {
|
||||||
|
StreamWatcher.shared.emmitPostEvent(for: postStatus)
|
||||||
|
}
|
||||||
case let .edit(status):
|
case let .edit(status):
|
||||||
postStatus = try await client.put(endpoint: Statuses.editStatus(id: status.id, json: data))
|
postStatus = try await client.put(endpoint: Statuses.editStatus(id: status.id, json: data))
|
||||||
|
if let postStatus {
|
||||||
|
StreamWatcher.shared.emmitEditEvent(for: postStatus)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
postingTimer?.invalidate()
|
postingTimer?.invalidate()
|
||||||
postingTimer = nil
|
postingTimer = nil
|
||||||
|
|
||||||
if let postStatus {
|
|
||||||
withAnimation {
|
withAnimation {
|
||||||
postingProgress = 99.0
|
postingProgress = 99.0
|
||||||
}
|
}
|
||||||
try await Task.sleep(for: .seconds(0.5))
|
try await Task.sleep(for: .seconds(0.5))
|
||||||
StreamWatcher.shared.emmitEditEvent(for: postStatus)
|
|
||||||
HapticManager.shared.fireHaptic(.notification(.success))
|
HapticManager.shared.fireHaptic(.notification(.success))
|
||||||
}
|
|
||||||
|
|
||||||
if hasExplicitlySelectedLanguage, let selectedLanguage {
|
if hasExplicitlySelectedLanguage, let selectedLanguage {
|
||||||
preferences?.markLanguageAsSelected(isoCode: selectedLanguage)
|
preferences?.markLanguageAsSelected(isoCode: selectedLanguage)
|
||||||
|
|
Loading…
Reference in a new issue