Loading authors
Currently, in the forum, the author is loaded like this.
private void loadAuthor() throws DbException {
Collection<LocalAuthor> localAuthors =
identityManager.getLocalAuthors();
for (LocalAuthor author : localAuthors) {
if (author == null)
continue;
data.setLocalAuthor(author);
break;
}
}
This follows the assumption that the first author (with a null safety check) is the correct author.
- Am I right to assume that we are following a single author scheme at the moment?
- Shouldn't we load up the author once, after login, and then just re-use that instance throughout the app ? Heck, we could even inject it.