Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
InstiApp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
RAHUL SHARMA
InstiApp
Commits
b7a2f022
Commit
b7a2f022
authored
Sep 01, 2018
by
mayu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Number of followers increase/decrease on clicking follow in body
parent
01b4b434
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
2 deletions
+5
-2
.idea/caches/build_file_checksums.ser
.idea/caches/build_file_checksums.ser
+0
-0
app/src/main/java/app/insti/fragment/BodyFragment.java
app/src/main/java/app/insti/fragment/BodyFragment.java
+2
-0
app/src/main/java/app/insti/notifications/NotificationIntentService.java
...va/app/insti/notifications/NotificationIntentService.java
+3
-2
No files found.
.idea/caches/build_file_checksums.ser
View file @
b7a2f022
No preview for this file type
app/src/main/java/app/insti/fragment/BodyFragment.java
View file @
b7a2f022
...
...
@@ -244,6 +244,8 @@ public class BodyFragment extends BackHandledFragment {
body
.
setBodyUserFollows
(!
body
.
getBodyUserFollows
());
new
updateDbBody
().
execute
(
body
);
followButton
.
setBackgroundColor
(
getResources
().
getColor
(
body
.
getBodyUserFollows
()
?
R
.
color
.
colorAccent
:
R
.
color
.
colorWhite
));
if
(
body
.
getBodyUserFollows
())
followButton
.
setText
(
body
.
getBodyFollowersCount
()
+
1
);
else
{
followButton
.
setText
(
body
.
getBodyFollowersCount
()
+
1
);}
}
}
...
...
app/src/main/java/app/insti/notifications/NotificationIntentService.java
View file @
b7a2f022
...
...
@@ -122,14 +122,15 @@ public class NotificationIntentService extends JobIntentService {
long
timediff
=
getDateDiff
(
new
Date
(),
event
.
getEventStartTime
(),
TimeUnit
.
MINUTES
);
if
(
timediff
<=
30
&&
timediff
>
0
)
{
// Change this to 30*10000 for testing
NOTIFICATION_ID
=
event
.
getEventID
().
hashCode
();
final
NotificationCompat
.
Builder
builder
=
new
NotificationCompat
.
Builder
(
getApplicationContext
(),
getResources
().
getString
(
R
.
string
.
default_notification_channel_id
));
builder
.
setContentTitle
(
event
.
getEventName
())
.
setAutoCancel
(
true
)
.
setColor
(
getResources
().
getColor
(
R
.
color
.
colorAccent
))
.
setContentText
(
"Event is about to start in "
+
getDateDiff
(
new
Date
(),
event
.
getEventStartTime
(),
TimeUnit
.
MINUTES
)
+
((
getDateDiff
(
new
Date
(),
event
.
getEventStartTime
(),
TimeUnit
.
MINUTES
)
==
1
)
?
" minute."
:
" minutes."
))
.
setLargeIcon
(
BitmapFactory
.
decodeResource
(
getResources
(),
R
.
drawable
.
lotus_white
))
.
setSmallIcon
(
R
.
drawable
.
lotus_white
);
.
setSmallIcon
(
R
.
drawable
.
lotus_white
)
// .addAction (R.drawable.common_google_signin_btn_icon_dark,"Hello", null)
;
Intent
intent
=
new
Intent
(
getApplicationContext
(),
MainActivity
.
class
);
intent
.
setAction
(
ACTION_OPEN_EVENT
);
...
...
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