Commit graph

6242 commits

Author SHA1 Message Date
Junwei Bai
362abe89a3 cy\strings.xml: Added missing zero, two, few, many quantities for lines 23 - 63 2024-10-23 21:08:54 +11:00
Junwei Bai
7199192d77 Revert "hr\strings.xml: Added missing zero, two, few, many quantities for lines 23 - 63"
This reverts commit 47232466ab.
2024-10-23 21:08:12 +11:00
Junwei Bai
47232466ab hr\strings.xml: Added missing zero, two, few, many quantities for lines 23 - 63 2024-10-23 20:59:53 +11:00
Junwei Bai
ab429bc3d3 hr\strings.xml: Added missing few quantity 2024-10-23 20:46:10 +11:00
Junwei Bai
43f99b94dd bs\strings.xml: Added missing few quantity 2024-10-23 20:42:56 +11:00
Junwei Bai
1552ba4dd3 AndroidManifest.xml: Removed redundant label android:label="@string/app_name" 2024-10-23 20:28:14 +11:00
Junwei Bai
f4f831b4e7 BookmarkLocationsDao.java: Added @SuppressLint("Range"), as -1 is expected behavior not index doesn't exist for getColumnIndex() 2024-10-23 20:25:48 +11:00
Junwei Bai
68c671a870 BookmarkItemsDao.java: Added @SuppressLint("Range"), as -1 is expected behavior not index doesn't exist for getColumnIndex() 2024-10-23 20:25:39 +11:00
Junwei Bai
8bc2094db8 WikipediaInstructionsDialogFragment.kt: Changed arguments!! to requireArguments() 2024-10-23 20:15:44 +11:00
Junwei Bai
9782dfc9f9 UploadMediaDetailFragment.java: Changed arguments!! to requireArguments() 2024-10-23 20:15:11 +11:00
Junwei Bai
59ec85d3ce SubCategoriesFragment.kt: Changed Objects.requireNonNull(getView()) to requireViews(), Objects.requireNonNull(getActivity()) to requireActivity() 2024-10-23 20:14:19 +11:00
Junwei Bai
3033c5ed0c SubCategoriesFragment.kt: Changed arguments!! to requireArguments() 2024-10-23 20:13:27 +11:00
Junwei Bai
37e4b76add ParentCategoriesFragment.kt: Changed arguments!! to requireArguments() 2024-10-23 20:12:17 +11:00
Junwei Bai
29c7982a3e ParentCategoriesFragment.kt: Changed arguments!! to requireArguments() 2024-10-23 20:08:52 +11:00
Junwei Bai
e441af938b DepictsFragment: Changed Objects.requireNonNull(getView()) to requireViews(), Objects.requireNonNull(getActivity())) to requireActivity() 2024-10-23 20:08:23 +11:00
Junwei Bai
a2777a0083 Merge branch 'main' of https://github.com/baijun6/apps-android-commons 2024-10-23 19:25:29 +11:00
u7119288
a007e9ab41
Merge branch 'commons-app:main' into main 2024-10-23 11:02:45 +11:00
cambo14
f1205c19be
UploadMediaDetailAdapter: made selecting a language deselect all others (#5883)
>> Made it so that selecting a language results in the hashmap storing the currently selected language(s) being cleared. Considered refactoring the hashmap storing this into a single pair storing the language positition index and its code, as only one language should ever be selected, however I am not confident that this would not introduce unintended side-effects
2024-10-23 03:50:37 +10:00
whe128
9c1c95f5cf
Fix for #5846: After uploading via Nearby, I am sent back to Nearby, where I am mislead into thinking that I must upload again #5846 (#5874)
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
2024-10-23 02:56:02 +10:00
Hanna Truong
ba7348f83f
Fixes issue #5841: Nearby pins: Make it easier to understand what the colors mean (#5881)
* UI design for legend to explain the colors of the nearby pins

* Add listener for the button to toggle the visibility of the legend (make it hideable)

* Change wording for legend and make text localizable

* Fixed typo

* Fixed typo

---------

Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
2024-10-22 21:27:40 +09:00
Junwei Bai
5faed112d4 DepictedImagesFragment.kt: Changed arguments!! to requireArguments() 2024-10-22 17:09:15 +11:00
Junwei Bai
bf9724fdca ChildDepictionsFragment.kt: Changed arguments!! to requireArguments() 2024-10-22 17:08:51 +11:00
Junwei Bai
7f41a31e8c CategoriesMediaFragment.kt: Changed arguments!! to requireArguments() 2024-10-22 17:08:31 +11:00
myyyy
7b0b604834
Fix: Prevent RecyclerView from resetting scroll position after returning from preview (#5873) (#5880)
Resolved an issue where RecyclerView would incorrectly scroll to the top after exiting fullscreen preview. Adjusted scroll behavior to maintain position unless actioned images are filtered. Implemented observer logic adjustments to handle dataset updates more efficiently.

Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
2024-10-21 22:41:32 +09:00
translatewiki.net
014feb54e5
Localisation updates from https://translatewiki.net. 2024-10-21 14:02:00 +02:00
LachlanMajor
56d0beb22a
Fixes #5840 Custom select folder display breaks after exiting media preview (#5866)
* ImageFragment.kt: notifyDataSetChanged() added to update observers about init call in handleResult()

* ImageFragment.kt: unnecessary initialisation after exiting media preview was removed from passSelectedImages
2024-10-20 21:36:15 +10:00
Junwei Bai
d8dada9483 Merge branch 'main' of https://github.com/baijun6/apps-android-commons 2024-10-20 17:02:00 +11:00
Christo Joby Antony
63f1ed8a2d
Fix for #5808: Update the cached Place Items on the successful association of Wiki Item (#5864)
* (fixes #5855) fetch item label in nearby based on user configured language.

* implement a method to delete Place entity from database

* clear the cache for a item when a wikiItem is updated.

* fix style issue

* Update placesRepository on successful WikiItemEdit

* Revert the delete operations added to the PlaceDAO

* Set name of the place to avoid race condition with NearbyParentFragment. Update Success Notification to show only after the pin has been updated.

* Clean-up

---------

Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
2024-10-19 22:20:35 +09:00
Junwei Bai
be2aa30789 UploadMediaPresenter.java: Changed toUpperCase to toLowerCase(Locale.ROOT) 2024-10-19 17:02:02 +11:00
Junwei Bai
1c539cd59c SearchActivity.java: Changed toUpperCase to toUpperCase(Locale.ROOT) 2024-10-19 17:01:09 +11:00
Junwei Bai
cb68fd35e2 ReviewActivity.java: Changed toUpperCase to toUpperCase(Locale.ROOT) 2024-10-19 17:00:26 +11:00
Junwei Bai
86751709ae RecentSearchesFragment.java: Changed toUpperCase to toUpperCase(Locale.ROOT) 2024-10-19 17:00:11 +11:00
Junwei Bai
d806a9af55 ProfileActivity.java: Changed toUpperCase to toUpperCase(Locale.ROOT) 2024-10-19 16:53:06 +11:00
Junwei Bai
34cf173030 NearbyFilterSearchRecyclerViewAdapter.java: Changed toUpperCase to toUpperCase(Locale.ROOT) 2024-10-19 16:50:52 +11:00
Junwei Bai
5caeb82478 MediaDetailFragment.java: Changed toUpperCase to toUpperCase(Locale.ROOT) 2024-10-19 16:44:44 +11:00
Junwei Bai
fe7d481329 LocationPickerActivity.java: Changed toUpperCase to toUpperCase(Locale.ROOT) 2024-10-19 16:43:32 +11:00
Junwei Bai
5d9e6f2f13 ExploreFragment.java: Changed toUpperCase to toUpperCase(Locale.ROOT) 2024-10-19 16:43:10 +11:00
Junwei Bai
e8a6d5ffc1 AchievementsFragment.java: Changed toUpperCase to toUpperCase(Locale.ROOT) 2024-10-19 16:42:53 +11:00
Junwei Bai
306d235175 Merge branch 'main' of https://github.com/baijun6/apps-android-commons 2024-10-19 16:38:47 +11:00
Junwei Bai
4158f79028 FileUtils.java: Changed toUpperCase to toUpperCase(Locale.getDefault()) 2024-10-19 15:04:56 +11:00
Junwei Bai
9a23d48592 ExploreFragment.java: Changed toUpperCase to toUpperCase(Locale.getDefault()) 2024-10-19 15:04:15 +11:00
Junwei Bai
0d1b10895f AchievementsFragment.java: Changed toUpperCase to toUpperCase(Locale.getDefault()) 2024-10-19 15:04:04 +11:00
ErenratZeng
c77e5abba7
notification: classify email messages and add mail check prompt (#5865)
This commit adds logic to classify notifications as "email" type when the notification text contains "sent you an email". It also updates the email notification prompt to support localization, ensuring a better user experience across different regions.

### Problem:
1. Previously, email-related notifications from the backend were missing a URL. As a result, when users clicked on these notifications, there was no link to open, and the notifications were categorized as UNKNOWN. This led to a poor user experience since there was no feedback provided when the user clicked on an email notification.
2. Additionally, the existing code used hardcoded English text for the email notification prompt, which did not provide a localized experience for users in different regions.

### Solution:
1. Added logic to categorize email-related notifications as `EMAIL` when the notification text contains "sent you an email".
2. Replaced the hardcoded "Check your email inbox" string with a localized string and added translations for multiple languages, including zh, zh-rhk, zh-rcn, zh-rtw, and ja.

### Changes:
- **NotificationClient**:
  - Modified `WikimediaNotification.toCommonsNotification()` to check if the notification text contains "sent you an email". If it does, the notification is classified as `EMAIL_MESSAGE` instead of the default `UNKNOWN`.

- **NotificationActivity**:
  - In the `NotificatinAdapter` click handler, added a check for `EMAIL_MESSAGE` type. When an email-type notification is clicked, a localized "Check your mail box" prompt is shown using `Snackbar`, instead of attempting to open a URL (which is typically missing for such notifications).
  - Modified to fetch the string using `getString(R.string.check_your_mail_box)` to support localization.

- **NotificationType**:
  - Added a new `EMAIL` type to categorize email-related notifications.

- **Localization**:
  - Added localized translations for "Check your mail box" in zh, zh-rhk, zh-rcn, zh-rtw, and ja.

Co-authored-by: Qiutong Zeng <Qiutong.zeng@anu.edu.au>
2024-10-18 15:31:54 +09:00
Parneet Singh
817e07b921
set permission required only upto android 5.1 (#5863)
Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
2024-10-18 10:15:56 +09:00
Junwei Bai
1d8509d436 PendingUploadsFragment.kt: removed unneeded non-null assertion (!!) 2024-10-18 01:52:24 +11:00
Junwei Bai
a1abc64a21 FailedUploadsFragment.kt: removed unneeded non-null assertion (!!) 2024-10-18 01:30:37 +11:00
Junwei Bai
6000788076 WikidataFeedback.kt: removed unneeded cast 2024-10-18 00:58:01 +11:00
Junwei Bai
2c6f05714b DescriptionEditActivity.kt: removed unnecessary safe call on a non-null receiver of type DescriptionEditHelper 2024-10-18 00:57:05 +11:00
Junwei Bai
32790add55 DescriptionEditActivity.kt: removed unnecessary safe call on a non-null receiver of type SessionManager 2024-10-18 00:56:35 +11:00
Junwei Bai
6b01afe442 CategoryClient.kt: removed condition 'page.categoryInfo() == null' as it's always 'false' 2024-10-18 00:55:32 +11:00