-
Notifications
You must be signed in to change notification settings - Fork 766
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix channel and channel group implementation (#750)
#535 started implementing custom channel and channels group creation but there were some missing parts that this PR finishes: - Using the incoming channel in `PostNotification` after creating it - Add channel group name and add this group to the custom channel - Show it in the example app This PR also fixes very old tests Closes #723 Co-authored-by: Yogev Ben David <[email protected]>
- Loading branch information
1 parent
e214fd9
commit f5b25b5
Showing
9 changed files
with
91 additions
and
71 deletions.
There are no files selected for viewing
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,14 @@ | ||
export class NotificationChannel { | ||
channelId: string | ||
name: string | ||
importance: -1000 | 0 | 1 | 2 | 3 | 4 | 5 | ||
description?: string | ||
enableLights?: boolean | ||
enableVibration?: boolean | ||
groupId?: string | ||
lightColor?: string | ||
showBadge?: boolean | ||
soundFile?: string // "sound_file.mp3" for the file "android/app/src/main/res/raw/sound_file.mp3" | ||
vibrationPattern?: number[] | ||
|
||
constructor( | ||
channelId: string, | ||
name: string, | ||
importance: -1000 | 0 | 1 | 2 | 3 | 4 | 5, | ||
description?: string, | ||
enableLights?: boolean, | ||
enableVibration?: boolean, | ||
groupId?: string, | ||
lightColor?: string, | ||
showBadge?: boolean, | ||
soundFile?: string, | ||
vibrationPattern?: number[], | ||
) { | ||
this.channelId = channelId; | ||
this.name = name; | ||
this.importance = importance; | ||
this.description = description; | ||
this.enableLights = enableLights; | ||
this.enableVibration = enableVibration; | ||
this.groupId = groupId; | ||
this.lightColor = lightColor; | ||
this.showBadge = showBadge; | ||
this.soundFile = soundFile; | ||
this.vibrationPattern = vibrationPattern; | ||
} | ||
export interface NotificationChannel { | ||
channelId: string; | ||
name: string; | ||
importance: -1000 | 0 | 1 | 2 | 3 | 4 | 5; | ||
description?: string; | ||
enableLights?: boolean; | ||
enableVibration?: boolean; | ||
groupId?: string; | ||
groupName?: string; | ||
lightColor?: string; | ||
showBadge?: boolean; | ||
soundFile?: string; | ||
vibrationPattern?: number[]; | ||
} |
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