mirror of https://github.com/zlatinb/muwire
fix manual re-attempts of hopeless downloads
parent
30cfa6fc7e
commit
622c18730c
|
@ -1,6 +1,7 @@
|
|||
|
||||
package com.muwire.gui
|
||||
|
||||
import com.muwire.core.download.DownloadHopelessEvent
|
||||
import com.muwire.core.messenger.MessageFolderLoadingEvent
|
||||
import com.muwire.core.search.ResultsEvent
|
||||
|
||||
|
@ -296,6 +297,7 @@ class MainFrameModel {
|
|||
me = core.me.getHumanReadableName()
|
||||
core.eventBus.register(UIResultBatchEvent.class, this)
|
||||
core.eventBus.register(DownloadStartedEvent.class, this)
|
||||
core.eventBus.register(DownloadHopelessEvent.class, this)
|
||||
core.eventBus.register(ConnectionEvent.class, this)
|
||||
core.eventBus.register(DisconnectionEvent.class, this)
|
||||
core.eventBus.register(FileHashedEvent.class, this)
|
||||
|
@ -421,6 +423,12 @@ class MainFrameModel {
|
|||
downloadInfoHashes.add(e.downloader.infoHash)
|
||||
}
|
||||
}
|
||||
|
||||
void onDownloadHopelessEvent(DownloadHopelessEvent event) {
|
||||
runInsideUIAsync {
|
||||
downloadInfoHashes.remove(event.downloader.getInfoHash())
|
||||
}
|
||||
}
|
||||
|
||||
void onConnectionEvent(ConnectionEvent e) {
|
||||
if (e.getStatus() != ConnectionAttemptStatus.SUCCESSFUL)
|
||||
|
|
Loading…
Reference in New Issue