Pārlūkot izejas kodu

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

cyberta 3 gadi atpakaļ
vecāks
revīzija
4f6a3591ee
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  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")
         }
     }