Skip to content

Commit

Permalink
Merge branch 'devel' of https://github.com/tinode/ios into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
or-else committed Dec 15, 2023
2 parents 99244e5 + 710a7a3 commit 27bb0ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion TinodeSDK/MeTopic.swift
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ open class MeTopic<DP: Codable & Mergeable>: Topic<DP, PrivateType, DP, PrivateT
topic.online = false
topic.lastSeen = LastSeen(when: Date(), ua: nil)
case .kMsg: // new message received
topic.setSetAndFetch(newSeq: pres.seq)
topic.setSeqAndFetch(newSeq: pres.seq)
if pres.act == nil || tinode!.isMe(uid: pres.act!) {
assignRead(to: topic, read: pres.seq)
}
Expand Down
4 changes: 2 additions & 2 deletions TinodeSDK/Topic.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public protocol TopicProto: AnyObject {
func updateAccessMode(ac: AccessChange?) -> Bool
func persist()
func expunge(hard: Bool)
func setSetAndFetch(newSeq: Int?)
func setSeqAndFetch(newSeq: Int?)
func getMessage(byEffectiveSeq seqId: Int) -> Message?

func allMessagesReceived(count: Int?)
Expand Down Expand Up @@ -1434,7 +1434,7 @@ open class Topic<DP: Codable & Mergeable, DR: Codable & Mergeable, SP: Codable,
return result
}

public func setSetAndFetch(newSeq: Int?) {
public func setSeqAndFetch(newSeq: Int?) {
guard let newSeq = newSeq, newSeq > description.getSeq else { return }
let limit = newSeq - description.getSeq
self.setSeq(seq: newSeq)
Expand Down

0 comments on commit 27bb0ae

Please sign in to comment.