-
Notifications
You must be signed in to change notification settings - Fork 984
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 recent album not showing count #17498
Conversation
{:title (i18n/label :t/my-albums) :data (:my-albums albums)}] | ||
window-height (:height (rn/get-window))] | ||
(let [albums (rf/sub [:camera-roll/albums]) | ||
add-recent-count-to-recent-album (-> albums |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be inside subscription :camera-roll/albums-with-count
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or in :camera-roll/albums
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went with a new subscription of :camera-roll/total-photos-count
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kindly take a look
Jenkins BuildsClick to see older builds (104)
|
{:db (assoc db :camera-roll/albums albums)}) | ||
{:db (-> db | ||
(assoc :camera-roll/albums albums) | ||
(assoc :camera-roll/total-photos-count |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still better to move to a subscription
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sometimes its better to make this in events yes, but not in this case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okey
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mind taking another look?
60% of end-end tests have passed
Failed tests (17)Click to expandClass TestCommunityMultipleDeviceMerged:
Class TestCommunityOneDeviceMerged:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Passed tests (26)Click to expandClass TestOneToOneChatMultipleSharedDevicesNewUiTwo:
Class TestActivityMultipleDevicePR:
Class TestCommunityOneDeviceMerged:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestActivityMultipleDevicePRTwo:
|
Hi @ibrkhalil! Thanx for the PR. Please take a look at the issues ISSUE 1 Recent album count number is incorrect for IOSActual result: Recent album shows the sum of images of the rest of the albums. But in fact, Recent album includes bunch of images which do not belong to other albums. So such count logic cannot be applied for IOS Expected result: here is the actual number of images that Recent album includes. |
src/status_im2/subs/chat/chats.cljs
Outdated
|
||
(re-frame/reg-sub | ||
:camera-roll/total-photos-count | ||
(fn [{:keys [camera-roll/albums]}] | ||
(->> albums | ||
:my-albums | ||
(reduce | ||
(fn [total-album-count curr-album] | ||
(+ total-album-count (:count curr-album))) | ||
0)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is incorrect. This will not get you the total photos count, but only the total of photos that are classified into albums. The camera roll library we are using does not have an option to get the total photo count. This needs to be done in native code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am back Saturday and will implement it, Thanks Omar!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done PR here
@pavloburykh |
Done, And as per request from @OmarBasem this adds a method that returns favorites and their count fe93660 |
@ibrkhalil please take a look at the new issue ISSUE 2 Scrolling through Recent album results in loading the same images over and over (Android)Reproducing Android 12, Samsung Galaxy A52 Steps:
Actual result:
telegram-cloud-document-2-5271698414512386993.mp4 |
Fixed. |
@ibrkhalil could you please rebase the PR and resolve conflicts? |
60% of end-end tests have passed
Failed tests (14)Click to expandClass TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestCommunityMultipleDeviceMerged:
Expected to fail tests (4)Click to expandClass TestGroupChatMultipleDeviceMergedNewUI:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestCommunityMultipleDeviceMerged:
Passed tests (27)Click to expandClass TestCommunityOneDeviceMerged:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
Class TestActivityMultipleDevicePRTwo:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestActivityMultipleDevicePR:
Class TestCommunityMultipleDeviceMerged:
|
Should be working now. |
73% of end-end tests have passed
Failed tests (9)Click to expandClass TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestCommunityMultipleDeviceMerged:
Class TestGroupChatMultipleDeviceMergedNewUI:
Expected to fail tests (3)Click to expandClass TestGroupChatMultipleDeviceMergedNewUI:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Passed tests (33)Click to expandClass TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
Class TestActivityMultipleDevicePRTwo:
Class TestCommunityOneDeviceMerged:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestActivityMultipleDevicePR:
Class TestCommunityMultipleDeviceMerged:
Class TestCommunityMultipleDeviceMergedTwo:
|
ISSUE 6: on Android 10 images are not shown in all albumsThis is the reason for failed e2e. FILE.2023-10-23.15.35.55.mp4Logs: Status-debug-logs.zip |
Cross-posting with #17241 (comment) |
Fixed. |
87% of end-end tests have passed
Failed tests (3)Click to expandClass TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestCommunityMultipleDeviceMergedTwo:
Expected to fail tests (3)Click to expandClass TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestGroupChatMultipleDeviceMergedNewUI:
Passed tests (39)Click to expandClass TestActivityMultipleDevicePR:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestCommunityOneDeviceMerged:
Class TestCommunityMultipleDeviceMerged:
Class TestActivityMultipleDevicePRTwo:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
|
@ibrkhalil something is wrong with the builds after recent rebase. Please take a look |
@pavloburykh Should be working now, Thank you! |
@ibrkhalil is it okay that there is still warning from packages-check-bot? |
It's just a warning about a library's git endpoint wanting to end with .git, But unfortunately adding .git to its path doesn't work. (And it's not required to merge, Which I think it means we can ignore it) |
@ibrkhalil thank you for the PR. Tested and ready for merge. |
fixes #17486
Summary
Fixes an issue that caused the recent album in the photo picker to not have the count of all images rendered.
status: ready