mirror of https://github.com/zlatinb/muwire
add getter and use it; account for the case where a file has no certificates
parent
449f46c62b
commit
27831b488b
|
@ -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,[]))
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue