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
2c58d45f
Commit
2c58d45f
authored
Feb 02, 2019
by
Varun Patil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix messed up NotificationId
parent
33c48c12
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
app/src/main/java/app/insti/notifications/NotificationId.java
...src/main/java/app/insti/notifications/NotificationId.java
+6
-5
No files found.
app/src/main/java/app/insti/notifications/NotificationId.java
View file @
2c58d45f
...
...
@@ -4,23 +4,24 @@ import java.util.concurrent.atomic.AtomicInteger;
public
class
NotificationId
{
private
final
static
AtomicInteger
c
=
new
AtomicInteger
(
0
);
private
final
static
AtomicInteger
current_count
=
new
AtomicInteger
(
0
);
public
static
int
getID
()
{
return
c
.
incrementAndGet
();
}
private
final
static
AtomicInteger
current_count
=
new
AtomicInteger
(
0
);
public
static
int
getCurrentCount
()
{
return
c
.
get
();
return
c
urrent_count
.
get
();
}
public
static
int
decrementAndGetCurrentCount
()
{
if
(
c
.
get
()
>
0
)
return
c
.
decrementAndGet
();
if
(
c
urrent_count
.
get
()
>
0
)
return
c
urrent_count
.
decrementAndGet
();
else
return
0
;
}
public
static
void
setCurrentCount
(
int
count
)
{
c
.
set
(
count
);
c
urrent_count
.
set
(
count
);
}
}
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