mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
WIP
This commit is contained in:
@@ -10,78 +10,28 @@ public enum PeerInputActivity: Comparable {
|
||||
case playingGame
|
||||
case recordingInstantVideo
|
||||
case uploadingInstantVideo(progress: Int32)
|
||||
|
||||
public static func ==(lhs: PeerInputActivity, rhs: PeerInputActivity) -> Bool {
|
||||
switch lhs {
|
||||
case .typingText:
|
||||
if case .typingText = rhs {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
case let .uploadingFile(progress):
|
||||
if case .uploadingFile(progress) = rhs {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
case .recordingVoice:
|
||||
if case .recordingVoice = rhs {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
case .playingGame:
|
||||
if case .playingGame = rhs {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
case .uploadingPhoto(let progress):
|
||||
if case .uploadingPhoto(progress) = rhs {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
case .uploadingVideo(let progress):
|
||||
if case .uploadingVideo(progress) = rhs {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
case .recordingInstantVideo:
|
||||
if case .recordingInstantVideo = rhs {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
case .uploadingInstantVideo(let progress):
|
||||
if case .uploadingInstantVideo(progress) = rhs {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
case speakingInGroupCall
|
||||
|
||||
public var key: Int32 {
|
||||
switch self {
|
||||
case .typingText:
|
||||
return 0
|
||||
case .uploadingFile:
|
||||
case .speakingInGroupCall:
|
||||
return 1
|
||||
case .recordingVoice:
|
||||
case .uploadingFile:
|
||||
return 2
|
||||
case .uploadingPhoto:
|
||||
case .recordingVoice:
|
||||
return 3
|
||||
case .uploadingVideo:
|
||||
case .uploadingPhoto:
|
||||
return 4
|
||||
case .recordingInstantVideo:
|
||||
case .uploadingVideo:
|
||||
return 5
|
||||
case .uploadingInstantVideo:
|
||||
case .recordingInstantVideo:
|
||||
return 6
|
||||
case .playingGame:
|
||||
case .uploadingInstantVideo:
|
||||
return 7
|
||||
case .playingGame:
|
||||
return 8
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,6 +61,8 @@ extension PeerInputActivity {
|
||||
self = .recordingInstantVideo
|
||||
case let .sendMessageUploadRoundAction(progress):
|
||||
self = .uploadingInstantVideo(progress: progress)
|
||||
case .speakingInGroupCallAction:
|
||||
self = .speakingInGroupCall
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user