projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename variable to fit purpose better.
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
template
/
SoneAccessor.java
diff --git
a/src/main/java/net/pterodactylus/sone/template/SoneAccessor.java
b/src/main/java/net/pterodactylus/sone/template/SoneAccessor.java
index
60e2e9b
..
c9c5f48
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/template/SoneAccessor.java
+++ b/
src/main/java/net/pterodactylus/sone/template/SoneAccessor.java
@@
-65,19
+65,18
@@
public class SoneAccessor extends ReflectionAccessor {
Sone sone = (Sone) object;
if (member.equals("niceName")) {
return getNiceName(sone);
Sone sone = (Sone) object;
if (member.equals("niceName")) {
return getNiceName(sone);
+ } else if (member.equals("local")) {
+ return sone.getInsertUri() != null;
} else if (member.equals("friend")) {
Sone currentSone = (Sone) dataProvider.getData("currentSone");
} else if (member.equals("friend")) {
Sone currentSone = (Sone) dataProvider.getData("currentSone");
- return (currentSone != null) && currentSone.hasFriend(sone);
+ return (currentSone != null) && currentSone.hasFriend(sone
.getId()
);
} else if (member.equals("current")) {
Sone currentSone = (Sone) dataProvider.getData("currentSone");
return (currentSone != null) && currentSone.equals(sone);
} else if (member.equals("current")) {
Sone currentSone = (Sone) dataProvider.getData("currentSone");
return (currentSone != null) && currentSone.equals(sone);
- } else if (member.equals("blocked")) {
- Sone currentSone = (Sone) dataProvider.getData("currentSone");
- return (currentSone != null) && currentSone.isSoneBlocked(sone.getId());
} else if (member.equals("modified")) {
} else if (member.equals("modified")) {
- return
sone.getModificationCounter() > 0
;
+ return
core.isModifiedSone(sone)
;
} else if (member.equals("status")) {
} else if (member.equals("status")) {
- return core.getSoneStatus(sone)
.toString()
;
+ return core.getSoneStatus(sone);
} else if (member.equals("unknown")) {
return core.getSoneStatus(sone) == SoneStatus.unknown;
} else if (member.equals("idle")) {
} else if (member.equals("unknown")) {
return core.getSoneStatus(sone) == SoneStatus.unknown;
} else if (member.equals("idle")) {
@@
-86,6
+85,10
@@
public class SoneAccessor extends ReflectionAccessor {
return core.getSoneStatus(sone) == SoneStatus.inserting;
} else if (member.equals("downloading")) {
return core.getSoneStatus(sone) == SoneStatus.downloading;
return core.getSoneStatus(sone) == SoneStatus.inserting;
} else if (member.equals("downloading")) {
return core.getSoneStatus(sone) == SoneStatus.downloading;
+ } else if (member.equals("new")) {
+ return core.isNewSone(sone);
+ } else if (member.equals("locked")) {
+ return core.isLocked(sone);
}
return super.get(dataProvider, object, member);
}
}
return super.get(dataProvider, object, member);
}
@@
-108,7
+111,7
@@
public class SoneAccessor extends ReflectionAccessor {
String lastName = profile.getLastName();
if (firstName == null) {
if (lastName == null) {
String lastName = profile.getLastName();
if (firstName == null) {
if (lastName == null) {
- return
sone.getName(
);
+ return
String.valueOf(sone.getName()
);
}
return lastName;
}
}
return lastName;
}