Kiwix mobile app on Android: Remove duplicate readers being added to multizim search
Kiwix is an offline reader for Web content. One of its main purposes is to make Wikipedia available offline. Read https://github.com/kiwix/kiwix-android/wiki/Google-Code-in to learn how to contribute.
We are in the middle of implementing an exciting new feature, multizim search. At the moment it is enabled in the settings menu. It allows searching between ZIM files. At the moment external articles can't be opened but that is an issue for another day.
At the moment whenever we scan a ZIM file in the local getcontent menu or open a ZIM file we add its reader to the current JNIKiwixSearcher that is used for multizim search. This quickly leads to duplicate results as the same ZIM file is added. Your task is to stop these duplicate results by only adding unique ZIM files to the searcher via some method such as a Set. ZIM files are uniquely identified by their ZIM id.
Most of this work will be carried out in ZimContentProvider.java but it should not require any changes to our backend C++ or JNIKiwixSearcher/Reader only the java code within the Kiwix-android module.