itkach / aard2-android

Aard2 for Android, a simple dictionary app
GNU General Public License v3.0
463 stars 97 forks source link

my changing dictionary is shown duplicated in the Dictionaries tab #152

Closed ildar closed 1 year ago

ildar commented 1 year ago

I'm making and updating my own small dictionary and put it in Android. That worked well. But I found that the dictionary is shown ~7 times in the Dictionaries tab.

I guess that various versions of a dictionary get different uuids (calculated) hence later versions accepted as a new dict.

itkach commented 1 year ago

Indeed, every new .slob gets a new uuid. They may have the same label, but are distinct. Dictionaries with the sameuri tag are understood to provide content in the same collection, same "logical" dictionary (meaning that articles from that dictionary are first in the lookup result when following links). I'm not sure if there's an issue or a question here - if you don't need older versions of your dictionary just remove them manually.

ildar commented 1 year ago

That would be fine to "just remove them manually" but it has bookmarks and history items bound to those.

itkach commented 1 year ago

bookmarks and history are not strictly bound to slob by uuid, if your dictionaries have uri tag and it remains the same across versions bookmarks and history should continue to work.

ildar commented 1 year ago

Unfortunately the app recreates the /app_dictionaries files from slobid-s it finds in history or bookmarks. No matter how many times I try to delete them.

itkach commented 1 year ago

why are you trying to delete them? this is internal app data, you're not supposed to mess with it. You "forget" (trash can icon) dictionaries is Dictionary tab in UI.

ildar commented 1 year ago

I exactly "forget" them from the app but they come back. I noted that they come back from the history/bookmarks that refer particular uuids.

itkach commented 1 year ago

still, why are you looking at internal app data? what is the actual issue you are trying to solve?

ildar commented 1 year ago

I'm just peeking. The issue I face is in the initial message:

But I found that the dictionary is shown ~7 times in the Dictionaries tab. This is a mess and it's growing with newer versions of my dictionary. I'm trying to clean it up from the UI ("forget" Trash button) but those come back.

itkach commented 1 year ago

Well, they don't come back from bookmarks or history, I'm pretty sure. I am unable to reproduce this at all, if I forget a dictionary - it's gone from the app. Dictionary files of course stay where they are unless user deletes them themselves, but there is no way for them to just show up (or come back) in the app

ildar commented 1 year ago

That almost works. But the bookmarks behave badly: when a word is opened in the first tab then it shows it isn't bookmarked. Then I can bookmark it 2nd time. And see the same word twice in the Bookmarks tab. etc.

itkach commented 1 year ago

I will look into this.

itkach commented 1 year ago

@ildar can you pls try this commit: bd227cbf2c522d82930a0c00f108408a16b8fa71 ?

ildar commented 1 year ago

I'd love to but can't build it yet: https://github.com/ildar/aard2-android/actions/runs/4217981805

itkach commented 1 year ago

Why not build locally?

On Sun, Feb 19, 2023, 15:34 ildar @.***> wrote:

I'd love to but can't build it yet: https://github.com/ildar/aard2-android/actions/runs/4217981805

— Reply to this email directly, view it on GitHub https://github.com/itkach/aard2-android/issues/152#issuecomment-1436086703, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABME4NPLM6EO6Q3H2Z7ME3WYJ7WPANCNFSM6AAAAAAT4RU2SU . You are receiving this because you commented.Message ID: @.***>

ildar commented 1 year ago

I'm not an Android developer. It'll take some time to build it locally. I usually just push the workflow file and M$ builds it for me.

itkach commented 1 year ago

It is certainly much easier/quicker to build locally than to figure out remote built with github actions.

On Sun, Feb 19, 2023, 15:46 ildar @.***> wrote:

I'm not an Android developer. It'll take some time to build it locally. I usually just push the workflow file and M$ builds it for me.

— Reply to this email directly, view it on GitHub https://github.com/itkach/aard2-android/issues/152#issuecomment-1436088970, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABME4NR7E3XAEANSXZLCKLWYKBCZANCNFSM6AAAAAAT4RU2SU . You are receiving this because you commented.Message ID: @.***>

itkach commented 1 year ago

@ildar here's apk (unzip first) aard2-android-debug.apk.zip

ildar commented 1 year ago

Thanks. This one looks like fixing the bug. Tested ~2 minutes, no regressions found

Message ID: @.***>

itkach commented 1 year ago

fixed in bd227cbf2c522d82930a0c00f108408a16b8fa71