add getter and use it; account for the case where a file has no certificates
This commit is contained in:
@ -109,6 +109,10 @@ public class SharedFile {
|
||||
return downloaders;
|
||||
}
|
||||
|
||||
public Set<SearchEntry> getSearches() {
|
||||
return searches;
|
||||
}
|
||||
|
||||
public void addDownloader(String name) {
|
||||
downloaders.add(name);
|
||||
}
|
||||
|
@ -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,[]))
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user