Hi, Dirk
If there is no problem please merge.
Hi, Dirk
If there is no problem please merge.
@ -65,2 +93,4 @@
}
private func navigationItemTitleView(pEpRating: Rating?, pEpProtection: Bool = true) -> UIView? {
if let img = pEpRating?.pEpColor().statusIconForMessage(enabled: pEpProtection) {
The if-else here now mixes UI-concerns (image exists or not?) with rating logic.
Maybe something like this?
if pEpRating == Rating.unencrypted && keyserverSupport {
// key server icon, if exists
} else {
// the status icon, if exists (original code)
}
The code is correct. There are two cases when we need code:
What is the problem with this?
@ -0,0 +25,4 @@
return
} successCallback: { ident in
do {
try session.vksRetriveKey(for: ident)
This is network, right? I think the adapter serializes all calls on one queue in its default session interface, and until the callbacks are handled no other adapter call is possible.
The code actually worked. I tried it out. What is the issue?
I think that any other queue using the adapter is blocked until the success callback here is finished. Of course, we could try to make the internal adapter queue concurrent to avoid problems like this. I don't remember if there were issues with a concurrent queue.
We could change session.vksRetrieveKey() having a success and a failure block itself. What do you think?
The tests don't compile, I guess because of the new setting.
I did not yet touch the tests, so this is absolutely possible.
@dirkz BTW, the p≡p engine is meant to be used in parallel. It must be initialized with the first init() and other calls to init() must only appear after the first init() is done. But then it is meant to be called once per thread. PEP_SESSION is meant to be stored in thread local storage. And when a (worker) thread shuts down, release() must be called on this thread. The last release() must be called after all other release() calls are done already. Would it be possible to change the adapter to execute like this?
@fdik wrote in #5 (comment):
@dirkz BTW, the p≡p engine is meant to be used in parallel. It must be initialized with the first init() and other calls to init() must only appear after the first init() is done. But then it is meant to be called once per thread. PEP_SESSION is meant to be stored in thread local storage. And when a (worker) thread shuts down, release() must be called on this thread. The last release() must be called after all other release() calls are done already. Would it be possible to change the adapter to execute like this?
Yes, certainly. It's mostly already like this, except in practice most actions on the session are serialized, for reasons I don't remember.
We can probably just merge this and go from there. I will fix the tests and work on the adapter then. @fdik Ok with you?
Merged, all tests green.
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?