-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMPROVE] Add ignore user to user profile (#4600)
* button ignore and pased the param * load room from database and check is is ignored * move handleIgnore to lib/method/helpers * Ignore and Unignore, also reactivity * block and unblock user * pass fromRid from actionView to InfoView too * remove console.log * unsubscribe subscriptionFrom * block and unblock user from dm * test to block user and ignore user * minor tweak * tweak data * minor tweak * add test before tapBack * refactor names
- Loading branch information
1 parent
331a202
commit 7fdf2dc
Showing
10 changed files
with
220 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { LISTENER } from '../../../containers/Toast'; | ||
import I18n from '../../../i18n'; | ||
import EventEmitter from './events'; | ||
import log from './log'; | ||
import { Services } from '../../services'; | ||
|
||
export const handleIgnore = async (userId: string, ignore: boolean, rid: string) => { | ||
try { | ||
await Services.ignoreUser({ | ||
rid, | ||
userId, | ||
ignore | ||
}); | ||
const message = I18n.t(ignore ? 'User_has_been_ignored' : 'User_has_been_unignored'); | ||
EventEmitter.emit(LISTENER, { message }); | ||
} catch (e) { | ||
log(e); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.