소스 검색

check for non-empty source_code_url

B. Petersen 3 년 전
부모
커밋
5a59228c3e
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      deltachat-ios/Controller/WebxdcViewController.swift

+ 2 - 1
deltachat-ios/Controller/WebxdcViewController.swift

@@ -158,7 +158,8 @@ class WebxdcViewController: WebViewViewController {
         let chatName = dcContext.getChat(chatId: msg.chatId).name
 
         self.title = document.isEmpty ? "\(webxdcName) – \(chatName)" : "\(document) – \(chatName)"
-        if let sourceCode = dict["source_code_url"] as? String {
+        if let sourceCode = dict["source_code_url"] as? String,
+           !sourceCode.isEmpty {
             sourceCodeUrl = sourceCode
             navigationItem.rightBarButtonItem = moreButton
         }