update on new collections

pull/53/head
Zlatin Balevsky 2020-11-02 19:15:18 +00:00
parent 0d85292739
commit ca9120e864
No known key found for this signature in database
GPG Key ID: A72832072D525E41
1 changed files with 9 additions and 0 deletions

View File

@ -24,6 +24,7 @@ import com.muwire.core.RouterDisconnectedEvent
import com.muwire.core.SharedFile
import com.muwire.core.collections.CollectionLoadedEvent
import com.muwire.core.collections.FileCollection
import com.muwire.core.collections.UICollectionCreatedEvent
import com.muwire.core.connection.ConnectionAttemptStatus
import com.muwire.core.connection.ConnectionEvent
import com.muwire.core.connection.DisconnectionEvent
@ -266,6 +267,7 @@ class MainFrameModel {
core.eventBus.register(FeedItemFetchedEvent.class, this)
core.eventBus.register(UIFeedConfigurationEvent.class, this)
core.eventBus.register(CollectionLoadedEvent.class, this)
core.eventBus.register(UICollectionCreatedEvent.class, this)
core.muOptions.watchedKeywords.each {
core.eventBus.publish(new ContentControlEvent(term : it, regex: false, add: true))
@ -775,4 +777,11 @@ class MainFrameModel {
view.collectionsTable.model.fireTableDataChanged()
}
}
void onUICollectionCreatedEvent(UICollectionCreatedEvent e) {
runInsideUIAsync {
localCollections.add(e.collection)
view.collectionsTable.model.fireTableDataChanged()
}
}
}