浏览代码

Merge pull request #360 from deltachat/marknoticed-chat

marknoticed chat on opening
cyBerta 5 年之前
父节点
当前提交
dbc03fac83
共有 2 个文件被更改,包括 6 次插入0 次删除
  1. 2 0
      deltachat-ios/Controller/ChatViewController.swift
  2. 4 0
      deltachat-ios/DC/Wrapper.swift

+ 2 - 0
deltachat-ios/Controller/ChatViewController.swift

@@ -59,6 +59,8 @@ class ChatViewController: MessagesViewController {
     }
     }
 
 
     override func viewDidLoad() {
     override func viewDidLoad() {
+        dcContext.marknoticedChat(chatId: chatId)
+
         messagesCollectionView.register(CustomMessageCell.self)
         messagesCollectionView.register(CustomMessageCell.self)
         super.viewDidLoad()
         super.viewDidLoad()
 
 

+ 4 - 0
deltachat-ios/DC/Wrapper.swift

@@ -36,6 +36,10 @@ class DcContext {
         dc_archive_chat(self.contextPointer, UInt32(chatId), Int32(archive ? 1 : 0))
         dc_archive_chat(self.contextPointer, UInt32(chatId), Int32(archive ? 1 : 0))
     }
     }
 
 
+    func marknoticedChat(chatId: Int) {
+        dc_marknoticed_chat(self.contextPointer, UInt32(chatId))
+    }
+
     func getSecurejoinQr (chatId: Int) -> String? {
     func getSecurejoinQr (chatId: Int) -> String? {
         if let cString = dc_get_securejoin_qr(self.contextPointer, UInt32(chatId)) {
         if let cString = dc_get_securejoin_qr(self.contextPointer, UInt32(chatId)) {
             let swiftString = String(cString: cString)
             let swiftString = String(cString: cString)