Skip to content
This repository has been archived by the owner on May 7, 2023. It is now read-only.

Delete same notification if enter the channel. #476

Merged

Conversation

SimYunSup
Copy link
Contributor

Specify project

client - RN.

Description

Delete same notification if enter the channel.
And if user on the channel, delete the related notification.

Screen_Recording_20210831-124838_Expo.Go.mp4

Related Issues

issue #463

Checklist

Before you create this PR confirms that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the [CLA].
  • Run yarn lint && yarn tsc
  • Run yarn test or yarn test -u if you need to update snapshot.
  • I am willing to follow-up on review comments in a timely manner.

[WeHack] - [we go]

@hyochan hyochan added 🎯 feature New feature 🍗 enhancement New feature or request and removed 🎯 feature New feature labels Aug 31, 2021
@codecov
Copy link

codecov bot commented Aug 31, 2021

Codecov Report

Merging #476 (6ad2efa) into master (271f6c0) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #476   +/-   ##
=======================================
  Coverage   73.11%   73.11%           
=======================================
  Files          65       65           
  Lines        1257     1257           
  Branches      142      142           
=======================================
  Hits          919      919           
  Misses        338      338           
Flag Coverage Δ
unittests 73.11% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 271f6c0...6ad2efa. Read the comment docs.

@hyochan
Copy link
Member

hyochan commented Sep 1, 2021

@JongtaekChoi @geoseong Could you kindly review this work?

Comment on lines +497 to +647
const parsedNotificationData = JSON.parse(
notification.request.content.data.data as string,
);
Copy link
Member

Choose a reason for hiding this comment

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

compared to other similar codes like L517-520 in this file and L131-L134 in MainStackNavigator, this has only different style. do you have any special reason?

I think this kind of code style has to become the same.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed like you commented, but I think it went back to original. I'll fix it.

Copy link
Member

Choose a reason for hiding this comment

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

I changed like you commented, but I think it went back to original. I'll fix it.

I checked your commit, but no change was detected. please check if you'd pushed the commit to your repo.

and your other code in the same file L517-L529 looks similar to this code block. so could you tell me why do you think it went back to original? and also I don't know what is the original 😆.

please understand me if I ask the dumb question 🙏

Copy link
Contributor

@JongtaekChoi JongtaekChoi left a comment

Choose a reason for hiding this comment

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

This change looks great. However, CodeCov bots warn you because no test code has been added. How about adding a few simple tests to this pool request? If you add 'expo-notification' mock to Message.test.tsx file you can easily raise up code coverage.

It's not necessary to add a test to this PR. I think we can make another PR and add it. And this is not mandatory, so you don't have to do it.

Copy link
Member

@hyochan hyochan left a comment

Choose a reason for hiding this comment

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

I think what we need in this PR is only below part.

if (parsedNotificationData.channelId === channelId)
  Notifications.dismissNotificationAsync(notification.request.identifier);

@geoseong
Copy link
Member

I think what we need in this PR is only below part.

if (parsedNotificationData.channelId === channelId)
  Notifications.dismissNotificationAsync(notification.request.identifier);

@hyochan if you think that PR looks good, I think you can merge this

@hyochan hyochan force-pushed the feature/delete_same_notification branch from 2a6e6ec to 6ad2efa Compare December 25, 2021 17:34
Copy link
Member

@hyochan hyochan left a comment

Choose a reason for hiding this comment

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

LGTM! Sorry for the delay 🙏

@hyochan hyochan merged commit e53ce36 into dooboolab-community:master Dec 25, 2021
@hyochan
Copy link
Member

hyochan commented Dec 25, 2021

@all-contributors Please add @SimYunSup for code.

@allcontributors
Copy link
Contributor

@hyochan

@SimYunSup already contributed before to code

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🍗 enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants