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
b7b8b12d
Commit
b7b8b12d
authored
Nov 30, 2018
by
Varun Patil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Animate updates to notifications (and other) lists
parent
7a5c9e12
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
0 deletions
+27
-0
app/src/main/java/app/insti/adapter/CardAdapter.java
app/src/main/java/app/insti/adapter/CardAdapter.java
+6
-0
app/src/main/java/app/insti/api/model/Body.java
app/src/main/java/app/insti/api/model/Body.java
+4
-0
app/src/main/java/app/insti/api/model/Event.java
app/src/main/java/app/insti/api/model/Event.java
+4
-0
app/src/main/java/app/insti/api/model/Notification.java
app/src/main/java/app/insti/api/model/Notification.java
+4
-0
app/src/main/java/app/insti/api/model/Role.java
app/src/main/java/app/insti/api/model/Role.java
+4
-0
app/src/main/java/app/insti/api/model/User.java
app/src/main/java/app/insti/api/model/User.java
+4
-0
app/src/main/java/app/insti/interfaces/CardInterface.java
app/src/main/java/app/insti/interfaces/CardInterface.java
+1
-0
No files found.
app/src/main/java/app/insti/adapter/CardAdapter.java
View file @
b7b8b12d
...
...
@@ -38,6 +38,7 @@ public abstract class CardAdapter<T extends CardInterface> extends RecyclerView.
public
CardAdapter
(
List
<
T
>
tList
,
Fragment
fragment
)
{
this
.
tList
=
tList
;
mFragment
=
fragment
;
this
.
setHasStableIds
(
true
);
}
@Override
...
...
@@ -114,6 +115,11 @@ public abstract class CardAdapter<T extends CardInterface> extends RecyclerView.
else
return
2
;
}
@Override
public
long
getItemId
(
int
position
)
{
return
tList
.
get
(
position
).
getId
();
}
@Override
public
int
getItemCount
()
{
return
tList
.
size
();
...
...
app/src/main/java/app/insti/api/model/Body.java
View file @
b7b8b12d
...
...
@@ -184,6 +184,10 @@ public class Body implements CardInterface {
this
.
bodyRoles
=
bodyRoles
;
}
public
long
getId
()
{
return
getBodyID
().
hashCode
();
}
public
String
getTitle
()
{
return
getBodyName
();
}
...
...
app/src/main/java/app/insti/api/model/Event.java
View file @
b7b8b12d
...
...
@@ -243,6 +243,10 @@ public class Event implements CardInterface {
return
Objects
.
hash
(
eventID
);
}
public
long
getId
()
{
return
hashCode
();
}
public
String
getTitle
()
{
return
getEventName
();
}
...
...
app/src/main/java/app/insti/api/model/Notification.java
View file @
b7b8b12d
...
...
@@ -79,6 +79,10 @@ public class Notification implements CardInterface {
this
.
notificationActor
=
notificationActor
;
}
public
long
getId
()
{
return
getNotificationId
().
hashCode
();
}
public
String
getTitle
()
{
if
(
isEvent
())
{
return
getEvent
().
getEventName
();
...
...
app/src/main/java/app/insti/api/model/Role.java
View file @
b7b8b12d
...
...
@@ -121,6 +121,10 @@ public class Role implements CardInterface {
this
.
roleUsersDetail
=
roleUsersDetail
;
}
public
long
getId
()
{
return
getRoleID
().
hashCode
();
}
public
String
getTitle
()
{
return
getRoleBodyDetails
().
getBodyName
();
}
...
...
app/src/main/java/app/insti/api/model/User.java
View file @
b7b8b12d
...
...
@@ -238,6 +238,10 @@ public class User implements CardInterface {
return
new
Gson
().
toJson
(
this
);
}
public
long
getId
()
{
return
getUserID
().
hashCode
();
}
public
String
getTitle
()
{
return
getUserName
();
}
...
...
app/src/main/java/app/insti/interfaces/CardInterface.java
View file @
b7b8b12d
package
app.insti.interfaces
;
public
interface
CardInterface
{
long
getId
();
String
getTitle
();
String
getSubtitle
();
String
getAvatarUrl
();
...
...
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