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
9ebf4654
Commit
9ebf4654
authored
Sep 26, 2018
by
Varun Patil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent making notification call for guest users
parent
6fdd22fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
app/src/main/java/app/insti/activity/MainActivity.java
app/src/main/java/app/insti/activity/MainActivity.java
+8
-3
No files found.
app/src/main/java/app/insti/activity/MainActivity.java
View file @
9ebf4654
...
@@ -140,8 +140,6 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
...
@@ -140,8 +140,6 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
}
}
}
}
fetchNotifications
();
checkLatestVersion
();
checkLatestVersion
();
NotificationEventReceiver
.
setupAlarm
(
getApplicationContext
());
NotificationEventReceiver
.
setupAlarm
(
getApplicationContext
());
...
@@ -394,8 +392,15 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
...
@@ -394,8 +392,15 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
public
boolean
onCreateOptionsMenu
(
Menu
menu
)
{
public
boolean
onCreateOptionsMenu
(
Menu
menu
)
{
// Inflate the menu; this adds items to the action bar if it is present.
// Inflate the menu; this adds items to the action bar if it is present.
this
.
menu
=
menu
;
this
.
menu
=
menu
;
fetchNotifications
();
getMenuInflater
().
inflate
(
R
.
menu
.
main
,
this
.
menu
);
getMenuInflater
().
inflate
(
R
.
menu
.
main
,
this
.
menu
);
// Fetch notifictions if logged in or hide icon
if
(
session
.
isLoggedIn
())
{
fetchNotifications
();
}
else
{
this
.
menu
.
findItem
(
R
.
id
.
action_notifications
).
setVisible
(
false
);
}
return
true
;
return
true
;
}
}
...
...
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