Skip to content
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

[#14245] Fix read/unread notifications filter #14333

Merged
merged 1 commit into from Nov 14, 2022

Conversation

rasom
Copy link
Member

@rasom rasom commented Nov 11, 2022

fix #14245

status: ready

@rasom rasom self-assigned this Nov 11, 2022
@rasom rasom requested review from ilmotta and removed request for ilmotta November 11, 2022 10:05
@status-github-bot status-github-bot bot added this to REVIEW in Pipeline for QA Nov 11, 2022
@rasom rasom requested review from flexsurfer, ilmotta and smohamedjavid and removed request for flexsurfer November 11, 2022 10:05
@status-im-auto
Copy link
Member

status-im-auto commented Nov 11, 2022

Jenkins Builds

Click to see older builds (12)
Commit #️⃣ Finished (UTC) Duration Platform Result
3e1f460 #1 2022-11-11 10:07:58 ~2 min tests 📄log
✔️ 3e1f460 #1 2022-11-11 10:13:59 ~8 min android 📦apk 📲
✔️ 3e1f460 #1 2022-11-11 10:14:21 ~8 min android-e2e 📦apk 📲
✔️ 3e1f460 #1 2022-11-11 10:47:51 ~42 min ios 📦ipa 📲
a1afde0 #2 2022-11-12 08:29:23 ~2 min tests 📄log
✔️ a1afde0 #2 2022-11-12 08:36:17 ~9 min android-e2e 📦apk 📲
✔️ a1afde0 #2 2022-11-12 08:36:52 ~10 min android 📦apk 📲
✔️ a1afde0 #2 2022-11-12 08:45:41 ~19 min ios 📦ipa 📲
532aa0a #3 2022-11-14 09:43:43 ~3 min tests 📄log
✔️ 532aa0a #3 2022-11-14 09:50:43 ~10 min android 📦apk 📲
✔️ 532aa0a #3 2022-11-14 09:50:54 ~10 min android-e2e 📦apk 📲
✔️ 532aa0a #3 2022-11-14 09:58:15 ~17 min ios 📦ipa 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ a7fe653 #4 2022-11-14 10:18:33 ~3 min tests 📦log
✔️ a7fe653 #4 2022-11-14 10:24:56 ~9 min android-e2e 📦apk 📲
✔️ a7fe653 #4 2022-11-14 10:28:36 ~13 min android 📦apk 📲
✔️ a7fe653 #4 2022-11-14 10:42:47 ~27 min ios 📦ipa 📲
✔️ 4353c4a #5 2022-11-14 12:43:44 ~2 min tests 📦log
✔️ 4353c4a #5 2022-11-14 12:49:36 ~8 min android 📦apk 📲
✔️ 4353c4a #5 2022-11-14 12:53:41 ~12 min android-e2e 📦apk 📲
✔️ 4353c4a #5 2022-11-14 12:57:25 ~16 min ios 📦ipa 📲

Copy link
Contributor

@ilmotta ilmotta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call to use a different endpoint wakuext_activityCenterNotificationsBy.

[rn/view {:style {:width 300, :height 100}}
[rn/text
(gstring/format
"I exist just to avoid crashing for no reason. I'm sorry. Type %d" type)]])
Copy link
Contributor

@ilmotta ilmotta Nov 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't need to tell Clojure devs that defmulti requires a default case, just like case, otherwise an exception is thrown if no match is found.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just to emphasise without checking the code that this should be removed asap.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was funny to read it 😄 I just try to avoid comments explaining how something in the language works, so that's why I bothered you with this.

@@ -25,6 +26,14 @@

(defmulti notification-component :type)

;; TODO(rasom): should be removed as soon as all notifications types covered
(defmethod notification-component :default
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: Although I wrote the solution with a multimethod, it'll die soon. In the branch I'm working on right now I had to split different notifications into different files for two reasons: code conflicts because we're touching the same file... and second and most important, because the identity verification notification has to be rendered also in a bottom sheet.

(if (= filter-status :read)
"wakuext_readActivityCenterNotifications"
"wakuext_unreadActivityCenterNotifications"))
(def ^:const status-read 1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have a doc reference as to why we should tell the compiler these things are constants? Does it bring any meaningful performance improvement?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it bring any meaningful performance improvement?

it doesn't

@rasom rasom force-pushed the fix/14245-fix-read-unread-notifications-filter branch 2 times, most recently from 532aa0a to a7fe653 Compare November 14, 2022 10:14
@rasom rasom force-pushed the fix/14245-fix-read-unread-notifications-filter branch from a7fe653 to 4353c4a Compare November 14, 2022 12:40
@rasom rasom merged commit 4353c4a into develop Nov 14, 2022
Pipeline for QA automation moved this from REVIEW to DONE Nov 14, 2022
@rasom rasom deleted the fix/14245-fix-read-unread-notifications-filter branch November 14, 2022 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

Incorrect read/unread filter behavior
3 participants