aboutsummaryrefslogtreecommitdiff
path: root/ui/verification-modal.go
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2020-07-25 20:54:32 +0300
committerTulir Asokan <tulir@maunium.net>2020-07-25 20:54:32 +0300
commitee3594db46fe261962f0a8a11c48cb9d6f84938f (patch)
treec12fc510597f33b82e17f630a00a3afb1e7849ab /ui/verification-modal.go
parentead7e0bf1d9c584224c1738b32ad26e314957220 (diff)
Add toggle to only send to verified devices
Diffstat (limited to 'ui/verification-modal.go')
-rw-r--r--ui/verification-modal.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/ui/verification-modal.go b/ui/verification-modal.go
index e47006e..54c2ecf 100644
--- a/ui/verification-modal.go
+++ b/ui/verification-modal.go
@@ -96,7 +96,9 @@ func NewVerificationModal(mainView *MainView, device *crypto.DeviceIdentity, tim
vm.emojiText = &EmojiView{}
- vm.inputBar = mauview.NewInputField().SetBackgroundColor(tcell.ColorDefault)
+ vm.inputBar = mauview.NewInputField().
+ SetBackgroundColor(tcell.ColorDefault).
+ SetPlaceholderTextColor(tcell.ColorWhite)
flex := mauview.NewFlex().
SetDirection(mauview.FlexRow).
@@ -176,7 +178,7 @@ func (vm *VerificationModal) OnCancel(cancelledByUs bool, reason string, _ event
} else {
vm.infoText.SetText(fmt.Sprintf("Verification cancelled by %s: %s", vm.device.UserID, reason))
}
- vm.inputBar.SetPlaceholder("Press enter to close dialog")
+ vm.inputBar.SetPlaceholder("Press enter to close the dialog")
vm.done = true
vm.parent.parent.Render()
}
@@ -185,9 +187,13 @@ func (vm *VerificationModal) OnSuccess() {
vm.waitingBar.SetIndeterminate(false).SetMax(100).SetProgress(100)
vm.parent.parent.app.SetRedrawTicker(1 * time.Minute)
vm.infoText.SetText(fmt.Sprintf("Successfully verified %s (%s) of %s", vm.device.Name, vm.device.DeviceID, vm.device.UserID))
- vm.inputBar.SetPlaceholder("Press enter to close dialog")
+ vm.inputBar.SetPlaceholder("Press enter to close the dialog")
vm.done = true
vm.parent.parent.Render()
+ if vm.parent.config.SendToVerifiedOnly {
+ // Hacky way to make new group sessions after verified
+ vm.parent.matrix.Crypto().(*crypto.OlmMachine).OnDevicesChanged(vm.device.UserID)
+ }
}
func (vm *VerificationModal) OnKeyEvent(event mauview.KeyEvent) bool {