Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

Commit

Permalink
more tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sashei committed May 31, 2019
1 parent f37eac0 commit 50857ac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 1 addition & 2 deletions Shared/Store/BaseAccountStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,13 @@ class BaseAccountStore {
self?.dispatcher.dispatch(action: sentryAction)
NSLog("Unexpected error getting access token: \(error.localizedDescription)")
self?._syncCredentials.onNext(nil)
} else if let error = err as? Error {
} else if let error = err {
let sentryAction = SentryAction(
title: "Unexpected exception: ",
error: error,
line: "\(#line)"
)
self?.dispatcher.dispatch(action: sentryAction)
throw error
self?._syncCredentials.onNext(nil)
}

Expand Down
10 changes: 6 additions & 4 deletions lockbox-ios/Presenter/ItemDetailPresenter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -148,19 +148,21 @@ class ItemDetailPresenter {
self.itemDetailStore.itemDetailId
.take(1)
.flatMap { self.dataStore.get($0) }
.flatMap { item -> Observable<[Action]> in
.map { item -> [Action] in
var actions: [Action] = []
if let item = item {
actions.append(DataStoreAction.touch(id: item.id))
actions.append(ItemDetailPresenter.getCopyActionFor(item, value: value, actionType: .dnd))
}

return Observable.just(actions)
}.subscribe(onNext: { actions in
return actions
}
.subscribe(onNext: { actions in
for action in actions {
self.dispatcher.dispatch(action: action)
}
}).disposed(by: self.disposeBag)
})
.disposed(by: self.disposeBag)
}
}

Expand Down

0 comments on commit 50857ac

Please sign in to comment.