浏览代码

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")
         }
     }