browse collections from contacts list

pull/53/head
Zlatin Balevsky 2020-11-05 22:05:49 +00:00
parent 47dc50b2bb
commit 38036132b8
No known key found for this signature in database
GPG Key ID: A72832072D525E41
2 changed files with 21 additions and 0 deletions

View File

@ -365,6 +365,24 @@ class MainFrameController {
view.showSearchWindow.call()
}
@ControllerAction
void browseCollectionsFromTrusted() {
int row = view.getSelectedTrustTablesRow("trusted-table")
if (row < 0)
return
Persona p = model.trusted[row].persona
UUID uuid = UUID.randomUUID()
def params = [:]
params.fileName = p.getHumanReadableName()
params.eventBus = core.eventBus
params.everything = true
params.uuid = uuid
params.host = p
mvcGroup.createMVCGroup("collection-tab", uuid.toString(), params)
view.showSearchWindow.call()
}
@ControllerAction
void chatFromTrusted() {
int row = view.getSelectedTrustTablesRow("trusted-table")

View File

@ -1256,6 +1256,9 @@ class MainFrameView {
JMenuItem browseItem = new JMenuItem(trans("BROWSE"))
browseItem.addActionListener({mvcGroup.controller.browseFromTrusted()})
trustMenu.add(browseItem)
JMenuItem browseCollectionsItem = new JMenuItem(trans("BROWSE_COLLECTIONS"))
browseCollectionsItem.addActionListener({mvcGroup.controller.browseCollectionsFromTrusted()})
trustMenu.add(browseCollectionsItem)
JMenuItem chatItem = new JMenuItem(trans("CHAT"))
chatItem.addActionListener({mvcGroup.controller.chatFromTrusted()})
trustMenu.add(chatItem)