-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Rockchip devices that are not mapped #525
Conversation
Not a fan of
|
Yeah, it was good enough for a few devices but it doesn't scale :) AFAICT all identifiers are exclusive except
It looks that you got rid of |
How is that suppose to work with the Also, is the iteration order deterministic? Does it matches the insertion order? The official documentation is confusing: the
Nope, both gone, see the diff. |
I don't understand the question :). It honors the first match. It will return whatever controller or fallback to default if none.
There is no gurantee elements will appear in the specific order they were insterted. They should in a case like this, IIRC. If that's what you want you might want to look at https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-linked-hash-map/. But why? AFAICT there's no device with two or more different controllers for the same kind of driver.
Ok, sorry. That totally works for me if you think it is easier to maintain. Maybe rename |
Isn't it a little weird to put all these TOLINO variant stuff in this generic Device file? https://github.com/benoit-pierre/android-luajit-launcher/blob/c41aa5ee8ee4c6b0c4557f7daf02dde64872a4aa/app/src/main/java/org/koreader/launcher/device/Device.kt#L41C1-L49C52 |
If both the
See above.
OK. |
Yeah, I don't like that |
I'm all in for a refactor. After a quick search I'm not sure if they're still required. But if they do they're better handled elsewhere. |
If the only usage is https://github.com/koreader/koreader/blob/1e55dda4c765be3316d7ca87be3052943cb1be86/frontend/device/android/device.lua#L141C3-L145C8 we could get rid of it completely. It should be moved to the wiki as yet another example in https://github.com/koreader/koreader/wiki/Android-tips-and-tricks#customize-keys |
either a But yeah, that's ultra annoying to deal with. Thanks for the refactor 👍 |
There is a bug in the code. TOLINO_EPOS3 uses NGL4EPDController in EPDFactory.kt. A similar problem exists for TOLINO_VISION6. EDIT: Seems to be the case not catched by the // Tolino (catch them all) Tolino Epos 3 Device info:
|
In any case, the |
Agreed, I updated the wiki page. |
superseded by #526 |
fix: #483 (comment)
This change is