   
   func sortByLastMsgDate(notification: NSNotification) {
     
-    let provider = RxMoyaProvider<ChatService>()
-    let channelApi = ChannelApiImpl(provider: provider)
-    var obsList: [Observable<Messages>] = []
+    //let provider = RxMoyaProvider<ChatService>()
+    //let channelApi = ChannelApiImpl(provider: provider)
+    //var obsList: [Observable<Messages>] = []
     
     for sv in list.subviews {
       let cwr = sv as! ChannelWithRed

      let token = team?.token!
      let id = cwr.button.stringTag
      
      obsList.append(channelApi.getHistoryByFlavor(token: token!, id:id, flavor: flavor, count: 1))
    }
    
    Observable.zip(obsList) { (messages) in
          NSLog("hey \(messages)")
      }.subscribeOn(ConcurrentDispatchQueueScheduler(qos: .background))
      .observeOn(MainScheduler.instance)
      .subscribe(
        onError: { error in
          NSLog("1111 \(error)")
      }
      )
      .addDisposableTo(disposeBag)

    
    //let alert = notification.object as! NSAlert

import Cocoa
import Moya
import RxSwift
import Alamofire

class ButtonWithStringTag: NSButton {
  var stringTag: String = ""
