|  |  |  | @ -240,16 +240,27 @@ final class SettingsVC : BaseVC, AvatarViewHelperDelegate { | 
		
	
		
			
				|  |  |  |  |             let closeButton = UIBarButtonItem(image: #imageLiteral(resourceName: "X"), style: .plain, target: self, action: #selector(close)) | 
		
	
		
			
				|  |  |  |  |             closeButton.tintColor = Colors.text | 
		
	
		
			
				|  |  |  |  |             navigationItem.leftBarButtonItem = closeButton | 
		
	
		
			
				|  |  |  |  |             let qrCodeButton = UIBarButtonItem(image: #imageLiteral(resourceName: "QRCode"), style: .plain, target: self, action: #selector(showQRCode)) | 
		
	
		
			
				|  |  |  |  |             qrCodeButton.tintColor = Colors.text | 
		
	
		
			
				|  |  |  |  |             var rightBarButtonItems: [UIBarButtonItem] = [ qrCodeButton ] | 
		
	
		
			
				|  |  |  |  |             if #available(iOS 13, *) { // Pre iOS 13 the user can't switch actively but the app still responds to system changes | 
		
	
		
			
				|  |  |  |  |                 let appModeIcon = isDarkMode ? #imageLiteral(resourceName: "ic_dark_theme_on") : #imageLiteral(resourceName: "ic_dark_theme_off") | 
		
	
		
			
				|  |  |  |  |                 let appModeButton = UIBarButtonItem(image: appModeIcon, style: .plain, target: self, action: #selector(switchAppMode)) | 
		
	
		
			
				|  |  |  |  |                 let appModeIcon = isDarkMode ? #imageLiteral(resourceName: "ic_dark_theme_on").withTintColor(.white) : #imageLiteral(resourceName: "ic_dark_theme_off").withTintColor(.black) | 
		
	
		
			
				|  |  |  |  |                 let appModeButton = UIButton() | 
		
	
		
			
				|  |  |  |  |                 appModeButton.setImage(appModeIcon, for: UIControl.State.normal) | 
		
	
		
			
				|  |  |  |  |                 appModeButton.tintColor = Colors.text | 
		
	
		
			
				|  |  |  |  |                 rightBarButtonItems.append(appModeButton) | 
		
	
		
			
				|  |  |  |  |                 appModeButton.addTarget(self, action: #selector(switchAppMode), for: UIControl.Event.touchUpInside) | 
		
	
		
			
				|  |  |  |  |                 let qrCodeIcon = isDarkMode ? #imageLiteral(resourceName: "QRCode").withTintColor(.white) : #imageLiteral(resourceName: "QRCode").withTintColor(.black) | 
		
	
		
			
				|  |  |  |  |                 let qrCodeButton = UIButton() | 
		
	
		
			
				|  |  |  |  |                 qrCodeButton.setImage(qrCodeIcon, for: UIControl.State.normal) | 
		
	
		
			
				|  |  |  |  |                 qrCodeButton.tintColor = Colors.text | 
		
	
		
			
				|  |  |  |  |                 qrCodeButton.addTarget(self, action: #selector(showQRCode), for: UIControl.Event.touchUpInside) | 
		
	
		
			
				|  |  |  |  |                 let stackView = UIStackView(arrangedSubviews: [ appModeButton, qrCodeButton ]) | 
		
	
		
			
				|  |  |  |  |                 stackView.axis = .horizontal | 
		
	
		
			
				|  |  |  |  |                 stackView.spacing = Values.mediumSpacing | 
		
	
		
			
				|  |  |  |  |                 navigationItem.rightBarButtonItem = UIBarButtonItem(customView: stackView) | 
		
	
		
			
				|  |  |  |  |             } else { | 
		
	
		
			
				|  |  |  |  |                 let qrCodeIcon = isDarkMode ? #imageLiteral(resourceName: "QRCode").asTintedImage(color: .white) : #imageLiteral(resourceName: "QRCode").asTintedImage(color: .black) | 
		
	
		
			
				|  |  |  |  |                 let qrCodeButton = UIBarButtonItem(image: qrCodeIcon, style: .plain, target: self, action: #selector(showQRCode)) | 
		
	
		
			
				|  |  |  |  |                 qrCodeButton.tintColor = Colors.text | 
		
	
		
			
				|  |  |  |  |                 navigationItem.rightBarButtonItem = qrCodeButton | 
		
	
		
			
				|  |  |  |  |             } | 
		
	
		
			
				|  |  |  |  |             navigationItem.rightBarButtonItems = rightBarButtonItems | 
		
	
		
			
				|  |  |  |  |         } | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |      | 
		
	
	
		
			
				
					|  |  |  | @ -298,6 +309,7 @@ final class SettingsVC : BaseVC, AvatarViewHelperDelegate { | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     @objc override internal func handleAppModeChangedNotification(_ notification: Notification) { | 
		
	
		
			
				|  |  |  |  |         super.handleAppModeChangedNotification(notification) | 
		
	
		
			
				|  |  |  |  |         updateNavigationBarButtons() | 
		
	
		
			
				|  |  |  |  |         settingButtonsStackView.arrangedSubviews.forEach { settingButton in | 
		
	
		
			
				|  |  |  |  |             settingButtonsStackView.removeArrangedSubview(settingButton) | 
		
	
		
			
				|  |  |  |  |             settingButton.removeFromSuperview() | 
		
	
	
		
			
				
					|  |  |  | 
 |