mirror of
https://github.com/lil-org/tokenary.git
synced 2024-12-02 09:33:49 +03:00
Don't start with import window
This commit is contained in:
parent
2ab0bf27a4
commit
6a342016b1
@ -51,16 +51,9 @@ class Agent: NSObject {
|
||||
|
||||
let windowController = Window.showNew()
|
||||
let completion = onSelectedAccount(session: wcSession)
|
||||
let accounts = accountsService.getAccounts()
|
||||
if !accounts.isEmpty {
|
||||
let accountsList = AccountsListViewController.with(preloadedAccounts: accounts)
|
||||
accountsList.onSelectedAccount = completion
|
||||
windowController.contentViewController = accountsList
|
||||
} else {
|
||||
let importViewController = instantiate(ImportViewController.self)
|
||||
importViewController.onSelectedAccount = completion
|
||||
windowController.contentViewController = importViewController
|
||||
}
|
||||
let accountsList = instantiate(AccountsListViewController.self)
|
||||
accountsList.onSelectedAccount = completion
|
||||
windowController.contentViewController = accountsList
|
||||
}
|
||||
|
||||
func showApprove(transaction: Transaction, peerMeta: WCPeerMeta?, completion: @escaping (Transaction?) -> Void) {
|
||||
|
@ -10,12 +10,6 @@ class AccountsListViewController: NSViewController {
|
||||
|
||||
var onSelectedAccount: ((Account) -> Void)?
|
||||
|
||||
static func with(preloadedAccounts: [Account]) -> AccountsListViewController {
|
||||
let new = instantiate(AccountsListViewController.self)
|
||||
new.accounts = preloadedAccounts
|
||||
return new
|
||||
}
|
||||
|
||||
@IBOutlet weak var addButton: NSButton! {
|
||||
didSet {
|
||||
let menu = NSMenu()
|
||||
|
Loading…
Reference in New Issue
Block a user