Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AloqaIM-Android
Commits
c8630df4
Commit
c8630df4
authored
Feb 21, 2017
by
Tiago Cunha
Committed by
GitHub
Feb 21, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into fix/resend-crashes
parents
174d5d12
994b32c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
+10
-11
AbstractAuthedActivity.java
.../chat/rocket/android/activity/AbstractAuthedActivity.java
+5
-5
PushNotificationHandler.java
...ava/chat/rocket/android/push/PushNotificationHandler.java
+5
-6
No files found.
app/src/main/java/chat/rocket/android/activity/AbstractAuthedActivity.java
View file @
c8630df4
...
...
@@ -56,13 +56,13 @@ abstract class AbstractAuthedActivity extends AbstractFragmentActivity {
editor
.
putString
(
RocketChatCache
.
KEY_SELECTED_ROOM_ID
,
intent
.
getStringExtra
(
PushConstants
.
ROOM_ID
));
}
if
(
intent
.
hasExtra
(
PushConstants
.
NOT_ID
))
{
PushNotificationHandler
.
cleanUpNotificationStack
(
intent
.
getIntExtra
(
PushConstants
.
NOT_ID
,
0
));
}
editor
.
apply
();
}
if
(
intent
.
hasExtra
(
PushConstants
.
NOT_ID
))
{
PushNotificationHandler
.
cleanUpNotificationStack
(
intent
.
getIntExtra
(
PushConstants
.
NOT_ID
,
0
));
}
}
private
void
updateHostnameIfNeeded
(
SharedPreferences
prefs
)
{
...
...
app/src/main/java/chat/rocket/android/push/PushNotificationHandler.java
View file @
c8630df4
...
...
@@ -102,18 +102,17 @@ public class PushNotificationHandler implements PushConstants {
String
hostname
=
getHostname
(
extras
);
String
roomId
=
getRoomId
(
extras
);
if
(
hostname
==
null
||
roomId
==
null
||
!
isValidHostname
(
context
,
hostname
))
{
return
;
}
int
notId
=
parseInt
(
NOT_ID
,
extras
);
Intent
notificationIntent
=
new
Intent
(
context
,
MainActivity
.
class
);
notificationIntent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_SINGLE_TOP
|
Intent
.
FLAG_ACTIVITY_CLEAR_TOP
);
notificationIntent
.
putExtra
(
PUSH_BUNDLE
,
extras
);
notificationIntent
.
putExtra
(
HOSTNAME
,
hostname
);
notificationIntent
.
putExtra
(
ROOM_ID
,
roomId
);
notificationIntent
.
putExtra
(
NOT_ID
,
notId
);
if
(
hostname
!=
null
&&
roomId
!=
null
&&
isValidHostname
(
context
,
hostname
))
{
notificationIntent
.
putExtra
(
HOSTNAME
,
hostname
);
notificationIntent
.
putExtra
(
ROOM_ID
,
roomId
);
}
int
requestCode
=
random
.
nextInt
();
PendingIntent
contentIntent
=
PendingIntent
.
getActivity
(
context
,
requestCode
,
notificationIntent
,
PendingIntent
.
FLAG_UPDATE_CURRENT
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment