add getter and use it; account for the case where a file has no certificates

This commit is contained in:
Zlatin Balevsky
2019-11-08 19:20:06 +00:00
parent 449f46c62b
commit 27831b488b
2 changed files with 7 additions and 3 deletions

View File

@@ -19,8 +19,8 @@ class SharedFileModel {
@Observable boolean showCommentActionEnabled
public void mvcGroupInit(Map<String,String> args) {
searchers.addAll(sf.searches)
downloaders.addAll(sf.downloaders)
certificates.addAll(core.certificateManager.byInfoHash.get(sf.infoHash))
searchers.addAll(sf.getSearches())
downloaders.addAll(sf.getDownloaders())
certificates.addAll(core.certificateManager.byInfoHash.getOrDefault(sf.infoHash,[]))
}
}