*/
public enum SoneStatus {
+ /** The Sone is unknown, i.e. not yet downloaded. */
+ unknown,
+
/** The Sone is idle, i.e. not being downloaded or inserted. */
idle,
if (!soneCache.containsKey(soneId)) {
Sone sone = new Sone(soneId);
soneCache.put(soneId, sone);
- setSoneStatus(sone, SoneStatus.idle);
+ setSoneStatus(sone, SoneStatus.unknown);
}
return soneCache.get(soneId);
}
*/
public void addLocalSone(Sone sone) {
if (localSones.add(sone)) {
+ setSoneStatus(sone, SoneStatus.idle);
SoneInserter soneInserter = new SoneInserter(this, freenetInterface, sone);
soneInserter.start();
soneInserters.put(sone, soneInserter);
addSone(parsedSone);
}
} finally {
- setSoneStatus(sone, SoneStatus.idle);
+ setSoneStatus(sone, (sone.getTime() == 0) ? SoneStatus.unknown : SoneStatus.idle);
}
}
}, "Sone Downloader").start();
core.addSone(parsedSone);
}
} finally {
- core.setSoneStatus(sone, SoneStatus.idle);
+ core.setSoneStatus(sone, (sone.getTime() == 0) ? SoneStatus.unknown : SoneStatus.idle);
}
}
return sone.getModificationCounter() > 0;
} else if (member.equals("status")) {
return core.getSoneStatus(sone).toString();
+ } else if (member.equals("unknown")) {
+ return core.getSoneStatus(sone) == SoneStatus.unknown;
} else if (member.equals("idle")) {
return core.getSoneStatus(sone) == SoneStatus.idle;
} else if (member.equals("inserting")) {
display: inline;
}
-#sone .sone .download-marker, #sone .sone .insert-marker, #sone .sone .idle-marker {
- display: inline;
+#sone .sone .unknown-marker, #sone .sone .download-marker, #sone .sone .insert-marker, #sone .sone .idle-marker, #sone .sone .modified-marker {
+ display: none;
}
-#sone .sone.idle .download-marker, #sone .sone.idle .insert-marker {
- display: none;
+#sone .sone.unknown .unknown-marker {
+ display: inline;
}
-#sone .sone.downloading .insert-marker, #sone .sone.downloading .idle-marker {
- display: none;
+#sone .sone.idle .idle-marker {
+ display: inline;
}
-#sone .sone.inserting .download-marker, #sone .sone.inserting .idle-marker {
- display: none;
+#sone .sone.downloading .download-marker {
+ display: inline;
}
-#sone .sone .modified-marker {
- display: none;
+#sone .sone.inserting .insert-marker {
+ display: inline;
}
#sone .sone.modified .modified-marker {
<div class="sone <% sone.status><%if sone.modified> modified<%/if>">
<div class="profile-link"><a href="viewSone.html?sone=<% sone.id>" title="<% sone.requestUri|html>"><% sone.niceName|html></a></div>
<div class="last-update">(<%= View.Sone.Label.LastUpdate|l10n|html> <% sone.time|date format="MMM d, yyyy, HH:mm:ss">)</div>
+ <div class="unknown-marker">?</div>
<div class="modified-marker">!</div>
<div class="download-marker">⬊</div>
<div class="insert-marker">⬈</div>