 		didSet {
 			if unreadCount != oldValue {
 				postUnreadCountDidChangeNotification()
+				UIApplication.shared.applicationIconBadgeNumber = unreadCount
 			}
 		}
 	}

import UIKit
import RSCore
import Account

var appDelegate: AppDelegate!



		DispatchQueue.main.async {
			self.unreadCount = AccountManager.shared.unreadCount
		}
		
		UNUserNotificationCenter.current().requestAuthorization(options:[.badge]) { (granted, error) in
			if granted {
				DispatchQueue.main.async {
					UIApplication.shared.registerForRemoteNotifications()
				}
			}
		}
		
		return true
