소스 검색

only switch between light and dark default background image if no custom background image was selected

cyberta 3 년 전
부모
커밋
4f6a3591ee
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      deltachat-ios/Chat/ChatViewController.swift

+ 2 - 1
deltachat-ios/Chat/ChatViewController.swift

@@ -860,7 +860,8 @@ class ChatViewController: UITableViewController {
     
     override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
         messageInputBar.inputTextView.layer.borderColor = DcColors.colorDisabled.cgColor
-        if #available(iOS 12.0, *) {
+        if #available(iOS 12.0, *),
+            UserDefaults.standard.string(forKey: Constants.Keys.backgroundImageUrl) == nil {
             backgroundContainer.image = UIImage(named: traitCollection.userInterfaceStyle == .light ? "background_light" : "background_dark")
         }
     }