From 899bdbc705d09340b0853cdcafc63446ef8237ea Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Fri, 15 Apr 2022 12:53:09 +0300 Subject: [PATCH] Update tcell --- config/config.go | 6 ++-- go.mod | 21 ++++++------- go.sum | 47 +++++++++++++----------------- gomuks.go | 2 +- lib/ansimage/ansimage.go | 4 ++- lib/notification/notify_windows.go | 1 + lib/notification/notify_xdg.go | 2 +- lib/open/open_darwin.go | 1 + lib/open/open_xdg.go | 3 +- main.go | 2 +- matrix/crypto.go | 2 +- matrix/nocrypto.go | 2 +- matrix/sync.go | 3 +- ui/command-processor.go | 2 +- ui/crypto-commands.go | 5 ++-- ui/fuzzy-search-modal.go | 5 ++-- ui/help-modal.go | 4 +-- ui/member-list.go | 5 ++-- ui/message-view.go | 6 ++-- ui/messages/base.go | 10 ++++--- ui/messages/expandedtextmessage.go | 5 ++-- ui/messages/filemessage.go | 7 +++-- ui/messages/html/base.go | 4 +-- ui/messages/html/blockquote.go | 2 +- ui/messages/html/break.go | 2 +- ui/messages/html/codeblock.go | 4 +-- ui/messages/html/container.go | 2 +- ui/messages/html/entity.go | 4 +-- ui/messages/html/horizontalline.go | 2 +- ui/messages/html/list.go | 3 +- ui/messages/html/parser.go | 6 ++-- ui/messages/html/text.go | 3 +- ui/messages/htmlmessage.go | 5 ++-- ui/messages/parser.go | 5 ++-- ui/messages/redactedmessage.go | 6 ++-- ui/messages/textmessage.go | 2 +- ui/messages/tstring/cell.go | 4 +-- ui/messages/tstring/string.go | 5 ++-- ui/no-crypto-commands.go | 2 +- ui/password-modal.go | 4 +-- ui/room-list.go | 5 ++-- ui/room-view.go | 4 +-- ui/syncing-modal.go | 2 +- ui/tag-room-list.go | 5 ++-- ui/ui.go | 6 ++-- ui/verification-modal.go | 11 +++---- ui/view-login.go | 8 ++--- ui/view-main.go | 10 +++---- ui/widget/border.go | 4 +-- ui/widget/color.go | 2 +- ui/widget/util.go | 4 +-- 51 files changed, 143 insertions(+), 128 deletions(-) diff --git a/config/config.go b/config/config.go index ffc8e97..3cb3653 100644 --- a/config/config.go +++ b/config/config.go @@ -25,14 +25,14 @@ import ( "path/filepath" "strings" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v3" "maunium.net/go/mautrix" "maunium.net/go/mautrix/id" "maunium.net/go/mautrix/pushrules" - "github.com/3nprob/cbind" - "maunium.net/go/tcell" + "go.mau.fi/cbind" + "go.mau.fi/tcell" "maunium.net/go/gomuks/debug" "maunium.net/go/gomuks/matrix/rooms" diff --git a/go.mod b/go.mod index 8c16fa9..4aff5bb 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,6 @@ module maunium.net/go/gomuks go 1.17 require ( - github.com/3nprob/cbind v0.0.0-20211207125121-3a585abdeddb github.com/alecthomas/chroma v0.10.0 github.com/disintegration/imaging v1.6.2 github.com/gabriel-vasile/mimetype v1.4.0 @@ -17,14 +16,15 @@ require ( github.com/sasha-s/go-deadlock v0.3.1 github.com/zyedidia/clipboard v1.0.3 go.etcd.io/bbolt v1.3.6 - golang.org/x/image v0.0.0-20220302094943-723b81ca9867 - golang.org/x/net v0.0.0-20220225172249-27dd8689420f + go.mau.fi/cbind v0.0.0-20220415094356-e1d579b7925e + go.mau.fi/mauview v0.1.4-0.20220415094128-878f45cf0adf + go.mau.fi/tcell v0.0.0-20220415093808-07c67d224693 + golang.org/x/image v0.0.0-20220413100746-70e8d0d3baa9 + golang.org/x/net v0.0.0-20220412020605-290c469a71a5 gopkg.in/toast.v1 v1.0.0-20180812000517-0a84660828b2 gopkg.in/vansante/go-ffprobe.v2 v2.0.3 - gopkg.in/yaml.v2 v2.4.0 - maunium.net/go/mautrix v0.10.13-0.20220326225001-78bcd9ec7ef9 - maunium.net/go/mauview v0.1.4-0.20211207121125-01ffaf935896 - maunium.net/go/tcell v0.2.0 + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b + maunium.net/go/mautrix v0.10.13-0.20220409135345-cbe2dbaef0e9 ) require ( @@ -38,9 +38,10 @@ require ( github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect github.com/tidwall/sjson v1.2.4 // indirect - github.com/zyedidia/poller v1.0.1 // indirect - golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect - golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect + golang.org/x/crypto v0.0.0-20220408190544-5352b0902921 // indirect + golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect + golang.org/x/term v0.0.0-20220411215600-e5f449aeb171 // indirect golang.org/x/text v0.3.7 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect maunium.net/go/maulogger/v2 v2.3.2 // indirect ) diff --git a/go.sum b/go.sum index 36f044d..c10aef8 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,3 @@ -github.com/3nprob/cbind v0.0.0-20211207125121-3a585abdeddb h1:1MTRfYbQB9Ew5k3feAgtTFZwBfOkWdNaupWWJKa4+Vc= -github.com/3nprob/cbind v0.0.0-20211207125121-3a585abdeddb/go.mod h1:qfgvjR6/wfSG5BBbzVHSWoJuSZhEIu4GXlBArOqYssI= github.com/alecthomas/chroma v0.10.0 h1:7XDcGkCQopCNKjZHfYrNLraA+M7e0fMiJ/Mfikbfjek= github.com/alecthomas/chroma v0.10.0/go.mod h1:jtJATyUxlIORhUOFNA9NZDWGAQ8wpxQQqNSB4rjA/1s= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -21,10 +19,8 @@ github.com/kyokomi/emoji/v2 v2.2.9 h1:UWYkjplPZ4rMPvLxc+/e12/xTqoRcn55oUySkpZ554 github.com/kyokomi/emoji/v2 v2.2.9/go.mod h1:JUcn42DTdsXJo1SWanHh4HKDEyPaR5CqkmoirZZP9qE= github.com/lithammer/fuzzysearch v1.1.3 h1:+t5SevHLfi3IHcTx7LT3S+od4OcUmjzxD1xmnvtgG38= github.com/lithammer/fuzzysearch v1.1.3/go.mod h1:1R1LRNk7yKid1BaQkmuLQaHruxcC4HmAH30Dh61Ih1Q= -github.com/lucasb-eyer/go-colorful v1.0.3/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= -github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.14.12 h1:TJ1bhYJPV44phC+IMu1u2K/i5RriLTPe+yc68XDJ1Z0= @@ -54,36 +50,38 @@ github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/sjson v1.2.4 h1:cuiLzLnaMeBhRmEv00Lpk3tkYrcxpmbU81tAY4Dw0tc= github.com/tidwall/sjson v1.2.4/go.mod h1:098SZ494YoMWPmMO6ct4dcFnqxwj9r/gF0Etp19pSNM= -github.com/zyedidia/clipboard v0.0.0-20200421031010-7c45b8673834/go.mod h1:zykFnZUXX0ErxqvYLUFEq7QDJKId8rmh2FgD0/Y8cjA= github.com/zyedidia/clipboard v1.0.3 h1:F/nCDVYMdbDWTmY8s8cJl0tnwX32q96IF09JHM14bUI= github.com/zyedidia/clipboard v1.0.3/go.mod h1:zykFnZUXX0ErxqvYLUFEq7QDJKId8rmh2FgD0/Y8cjA= -github.com/zyedidia/poller v1.0.1 h1:Tt9S3AxAjXwWGNiC2TUdRJkQDZSzCBNVQ4xXiQ7440s= -github.com/zyedidia/poller v1.0.1/go.mod h1:vZXJOHGDcuK08GXhF6IAY0ZFd2WcgOR5DOTp84Uk5eE= go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= -golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd h1:XcWmESyNjXJMLahc3mqVQJcgSTDxFxhETVlfk9uGc38= -golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +go.mau.fi/cbind v0.0.0-20220415094356-e1d579b7925e h1:zY4TZmHAaUhrMFJQfh02dqxDYSfnnXlw/qRoFanxZTw= +go.mau.fi/cbind v0.0.0-20220415094356-e1d579b7925e/go.mod h1:9nnzlslhUo/xO+8tsQgkFqG/W+SgD+r0iTYAuglzlmA= +go.mau.fi/mauview v0.1.4-0.20220415094128-878f45cf0adf h1:SRvoKilcnb2wEf65uw3aqJVQtxOgLUbV9uePAP+f8qA= +go.mau.fi/mauview v0.1.4-0.20220415094128-878f45cf0adf/go.mod h1:CPqlQWgiHEJHLNyD8vjMXotnPluMz0eDpKKCimjxFYE= +go.mau.fi/tcell v0.0.0-20220415093808-07c67d224693 h1:pCfn8BS6fiGG1inpebysWQxeRmK/nsgKPMF9TupqYNQ= +go.mau.fi/tcell v0.0.0-20220415093808-07c67d224693/go.mod h1:HQLPCz9v8YfYewMetOKrg9pe87XEyNcIfCYYq8VxQbU= +golang.org/x/crypto v0.0.0-20220408190544-5352b0902921 h1:iU7T1X1J6yxDr0rda54sWGkHgOp5XJrqm79gcNlC2VM= +golang.org/x/crypto v0.0.0-20220408190544-5352b0902921/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20220302094943-723b81ca9867 h1:TcHcE0vrmgzNH1v3ppjcMGbhG5+9fMuvOmUYwNEF4q4= -golang.org/x/image v0.0.0-20220302094943-723b81ca9867/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= +golang.org/x/image v0.0.0-20220413100746-70e8d0d3baa9 h1:LRtI4W37N+KFebI/qV0OFiLUv4GLOWeEW5hn/KEJvxE= +golang.org/x/image v0.0.0-20220413100746-70e8d0d3baa9/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/sys v0.0.0-20200501145240-bc7a7d42d5c3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/net v0.0.0-20220407224826-aac1ed45d8e3/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220412020605-290c469a71a5 h1:bRb386wvrE+oBNdF1d/Xh9mQrfQ4ecYhW5qJ5GvTGT4= +golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210309040221-94ec62e08169/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20220411215600-e5f449aeb171 h1:EH1Deb8WZJ0xc0WK//leUHXcX9aLE5SymusoTmMZye8= +golang.org/x/term v0.0.0-20220411215600-e5f449aeb171/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= @@ -96,13 +94,10 @@ gopkg.in/vansante/go-ffprobe.v2 v2.0.3 h1:nmR7yLalb5p5UmXhXUYnrsIkbb8j7h2OYMDoLE gopkg.in/vansante/go-ffprobe.v2 v2.0.3/go.mod h1:qF0AlAjk7Nqzqf3y333Ly+KxN3cKF2JqA3JT5ZheUGE= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= maunium.net/go/maulogger/v2 v2.3.2 h1:1XmIYmMd3PoQfp9J+PaHhpt80zpfmMqaShzUTC7FwY0= maunium.net/go/maulogger/v2 v2.3.2/go.mod h1:TYWy7wKwz/tIXTpsx8G3mZseIRiC5DoMxSZazOHy68A= -maunium.net/go/mautrix v0.10.13-0.20220326225001-78bcd9ec7ef9 h1:MXsLi4Z7peG9agVUVl0ZNU+0vWz32noViDYlPYVzdx4= -maunium.net/go/mautrix v0.10.13-0.20220326225001-78bcd9ec7ef9/go.mod h1:WqW8mruBue+1YrL/f04Ni/4R5yfLcgO8BQhUJzl7sps= -maunium.net/go/mauview v0.1.4-0.20211207121125-01ffaf935896 h1:gkyEyN8o90+/pCKz4pdJO9rRtAsfkh1yZghDBcOIUUQ= -maunium.net/go/mauview v0.1.4-0.20211207121125-01ffaf935896/go.mod h1:LHkZszUZ1AKcOc1rg5cMCqxQWDAlHtA0VZLhphWJVRY= -maunium.net/go/tcell v0.2.0 h1:1Q0kN3wCOGAIGu1r3QHADsjSUOPDylKREvCv3EzJpVg= -maunium.net/go/tcell v0.2.0/go.mod h1:9Apcb3lNNS6C6lCqKT9UFp7BTRzHXfWE+/tgufsAMho= +maunium.net/go/mautrix v0.10.13-0.20220409135345-cbe2dbaef0e9 h1:LcZDeMbuaj+f/WdOfX+OjLHjH58fRCu0PLmt+XO+iyY= +maunium.net/go/mautrix v0.10.13-0.20220409135345-cbe2dbaef0e9/go.mod h1:+LYU9Y5wunwC3ya7O4FuweCBQ5MVaglcgO/DGmXDbcg= diff --git a/gomuks.go b/gomuks.go index f076b10..5e91d0e 100644 --- a/gomuks.go +++ b/gomuks.go @@ -24,7 +24,7 @@ import ( "maunium.net/go/gomuks/config" "maunium.net/go/gomuks/debug" - "maunium.net/go/gomuks/interface" + ifc "maunium.net/go/gomuks/interface" "maunium.net/go/gomuks/matrix" ) diff --git a/lib/ansimage/ansimage.go b/lib/ansimage/ansimage.go index ece1f2c..1001fe9 100644 --- a/lib/ansimage/ansimage.go +++ b/lib/ansimage/ansimage.go @@ -26,9 +26,11 @@ import ( _ "golang.org/x/image/bmp" // initialize decoder _ "golang.org/x/image/tiff" // initialize decoder _ "golang.org/x/image/webp" // initialize decoder + + "go.mau.fi/tcell" + "maunium.net/go/gomuks/debug" "maunium.net/go/gomuks/ui/messages/tstring" - "maunium.net/go/tcell" ) var ( diff --git a/lib/notification/notify_windows.go b/lib/notification/notify_windows.go index ad14ecc..954788b 100644 --- a/lib/notification/notify_windows.go +++ b/lib/notification/notify_windows.go @@ -19,6 +19,7 @@ package notification import ( "gopkg.in/toast.v1" ) + func Send(title, text string, critical, sound bool) error { notification := toast.Notification{ AppID: "gomuks", diff --git a/lib/notification/notify_xdg.go b/lib/notification/notify_xdg.go index 7f102b8..5320ee8 100644 --- a/lib/notification/notify_xdg.go +++ b/lib/notification/notify_xdg.go @@ -1,4 +1,4 @@ -// +build !windows,!darwin +//go:build !windows && !darwin // gomuks - A terminal Matrix client written in Go. // Copyright (C) 2020 Tulir Asokan diff --git a/lib/open/open_darwin.go b/lib/open/open_darwin.go index 625ec54..8947413 100644 --- a/lib/open/open_darwin.go +++ b/lib/open/open_darwin.go @@ -1,4 +1,5 @@ package open const Command = "open" + var Args []string diff --git a/lib/open/open_xdg.go b/lib/open/open_xdg.go index e107a8a..bf0796e 100644 --- a/lib/open/open_xdg.go +++ b/lib/open/open_xdg.go @@ -1,6 +1,7 @@ -// +build !windows,!darwin +//go:build !windows && !darwin package open const Command = "xdg-open" + var Args []string diff --git a/main.go b/main.go index 5dfc801..0b72f98 100644 --- a/main.go +++ b/main.go @@ -27,7 +27,7 @@ import ( "time" "maunium.net/go/gomuks/debug" - "maunium.net/go/gomuks/interface" + ifc "maunium.net/go/gomuks/interface" "maunium.net/go/gomuks/ui" ) diff --git a/matrix/crypto.go b/matrix/crypto.go index a435a1c..87406e0 100644 --- a/matrix/crypto.go +++ b/matrix/crypto.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// +build cgo +//go:build cgo package matrix diff --git a/matrix/nocrypto.go b/matrix/nocrypto.go index 5c9e775..90b3dd9 100644 --- a/matrix/nocrypto.go +++ b/matrix/nocrypto.go @@ -1,6 +1,6 @@ // This contains no-op stubs of the methods in crypto.go for non-cgo builds with crypto disabled. -// +build !cgo +//go:build !cgo package matrix diff --git a/matrix/sync.go b/matrix/sync.go index 3fae266..7c1d879 100644 --- a/matrix/sync.go +++ b/matrix/sync.go @@ -26,9 +26,8 @@ import ( "maunium.net/go/mautrix/event" "maunium.net/go/mautrix/id" - ifc "maunium.net/go/gomuks/interface" - "maunium.net/go/gomuks/debug" + ifc "maunium.net/go/gomuks/interface" "maunium.net/go/gomuks/matrix/rooms" ) diff --git a/ui/command-processor.go b/ui/command-processor.go index bfab700..24849d8 100644 --- a/ui/command-processor.go +++ b/ui/command-processor.go @@ -24,7 +24,7 @@ import ( "maunium.net/go/gomuks/config" "maunium.net/go/gomuks/debug" - "maunium.net/go/gomuks/interface" + ifc "maunium.net/go/gomuks/interface" ) type gomuksPointerContainer struct { diff --git a/ui/crypto-commands.go b/ui/crypto-commands.go index 8968392..9722dcc 100644 --- a/ui/crypto-commands.go +++ b/ui/crypto-commands.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// +build cgo +//go:build cgo package ui @@ -27,11 +27,12 @@ import ( "time" "unicode" - ifc "maunium.net/go/gomuks/interface" "maunium.net/go/mautrix" "maunium.net/go/mautrix/crypto" "maunium.net/go/mautrix/crypto/ssss" "maunium.net/go/mautrix/id" + + ifc "maunium.net/go/gomuks/interface" ) func autocompleteDeviceUserID(cmd *CommandAutocomplete) (completions []string, newText string) { diff --git a/ui/fuzzy-search-modal.go b/ui/fuzzy-search-modal.go index d22826c..07f510f 100644 --- a/ui/fuzzy-search-modal.go +++ b/ui/fuzzy-search-modal.go @@ -23,9 +23,10 @@ import ( "github.com/lithammer/fuzzysearch/fuzzy" + "go.mau.fi/mauview" + "go.mau.fi/tcell" + "maunium.net/go/mautrix/id" - "maunium.net/go/mauview" - "maunium.net/go/tcell" "maunium.net/go/gomuks/config" "maunium.net/go/gomuks/debug" diff --git a/ui/help-modal.go b/ui/help-modal.go index a11e46e..ec8a85d 100644 --- a/ui/help-modal.go +++ b/ui/help-modal.go @@ -1,8 +1,8 @@ package ui import ( - "maunium.net/go/mauview" - "maunium.net/go/tcell" + "go.mau.fi/mauview" + "go.mau.fi/tcell" "maunium.net/go/gomuks/config" ) diff --git a/ui/member-list.go b/ui/member-list.go index 4598b22..089c156 100644 --- a/ui/member-list.go +++ b/ui/member-list.go @@ -23,10 +23,11 @@ import ( "github.com/mattn/go-runewidth" + "go.mau.fi/mauview" + "go.mau.fi/tcell" + "maunium.net/go/mautrix/event" "maunium.net/go/mautrix/id" - "maunium.net/go/mauview" - "maunium.net/go/tcell" "maunium.net/go/gomuks/matrix/rooms" "maunium.net/go/gomuks/ui/widget" diff --git a/ui/message-view.go b/ui/message-view.go index 2ae47c1..6d05546 100644 --- a/ui/message-view.go +++ b/ui/message-view.go @@ -25,15 +25,15 @@ import ( "github.com/mattn/go-runewidth" sync "github.com/sasha-s/go-deadlock" - "maunium.net/go/mauview" - "maunium.net/go/tcell" + "go.mau.fi/mauview" + "go.mau.fi/tcell" "maunium.net/go/mautrix/event" "maunium.net/go/mautrix/id" "maunium.net/go/gomuks/config" "maunium.net/go/gomuks/debug" - "maunium.net/go/gomuks/interface" + ifc "maunium.net/go/gomuks/interface" "maunium.net/go/gomuks/lib/open" "maunium.net/go/gomuks/ui/messages" "maunium.net/go/gomuks/ui/widget" diff --git a/ui/messages/base.go b/ui/messages/base.go index d3bf251..a5aa62d 100644 --- a/ui/messages/base.go +++ b/ui/messages/base.go @@ -21,12 +21,14 @@ import ( "sort" "time" - "maunium.net/go/gomuks/config" - "maunium.net/go/gomuks/matrix/muksevt" "maunium.net/go/mautrix/event" "maunium.net/go/mautrix/id" - "maunium.net/go/mauview" - "maunium.net/go/tcell" + + "go.mau.fi/mauview" + "go.mau.fi/tcell" + + "maunium.net/go/gomuks/config" + "maunium.net/go/gomuks/matrix/muksevt" "maunium.net/go/gomuks/ui/widget" ) diff --git a/ui/messages/expandedtextmessage.go b/ui/messages/expandedtextmessage.go index d8ee3a2..17f8236 100644 --- a/ui/messages/expandedtextmessage.go +++ b/ui/messages/expandedtextmessage.go @@ -20,9 +20,10 @@ import ( "fmt" "time" + "go.mau.fi/mauview" + "go.mau.fi/tcell" + "maunium.net/go/gomuks/matrix/muksevt" - "maunium.net/go/mauview" - "maunium.net/go/tcell" "maunium.net/go/gomuks/config" "maunium.net/go/gomuks/ui/messages/tstring" diff --git a/ui/messages/filemessage.go b/ui/messages/filemessage.go index 3d5e554..8788d12 100644 --- a/ui/messages/filemessage.go +++ b/ui/messages/filemessage.go @@ -25,12 +25,13 @@ import ( "maunium.net/go/mautrix/crypto/attachment" "maunium.net/go/mautrix/event" "maunium.net/go/mautrix/id" - "maunium.net/go/mauview" - "maunium.net/go/tcell" + + "go.mau.fi/mauview" + "go.mau.fi/tcell" "maunium.net/go/gomuks/config" "maunium.net/go/gomuks/debug" - "maunium.net/go/gomuks/interface" + ifc "maunium.net/go/gomuks/interface" "maunium.net/go/gomuks/lib/ansimage" "maunium.net/go/gomuks/matrix/muksevt" "maunium.net/go/gomuks/ui/messages/tstring" diff --git a/ui/messages/html/base.go b/ui/messages/html/base.go index a1e9a8c..fff3b67 100644 --- a/ui/messages/html/base.go +++ b/ui/messages/html/base.go @@ -18,8 +18,8 @@ package html import ( "fmt" - "maunium.net/go/mauview" - "maunium.net/go/tcell" + "go.mau.fi/mauview" + "go.mau.fi/tcell" ) type BaseEntity struct { diff --git a/ui/messages/html/blockquote.go b/ui/messages/html/blockquote.go index 4fa91be..88e7aaf 100644 --- a/ui/messages/html/blockquote.go +++ b/ui/messages/html/blockquote.go @@ -20,7 +20,7 @@ import ( "fmt" "strings" - "maunium.net/go/mauview" + "go.mau.fi/mauview" ) type BlockquoteEntity struct { diff --git a/ui/messages/html/break.go b/ui/messages/html/break.go index 7c35e44..8996e56 100644 --- a/ui/messages/html/break.go +++ b/ui/messages/html/break.go @@ -17,7 +17,7 @@ package html import ( - "maunium.net/go/mauview" + "go.mau.fi/mauview" ) type BreakEntity struct { diff --git a/ui/messages/html/codeblock.go b/ui/messages/html/codeblock.go index e7851a3..3c578ee 100644 --- a/ui/messages/html/codeblock.go +++ b/ui/messages/html/codeblock.go @@ -17,8 +17,8 @@ package html import ( - "maunium.net/go/mauview" - "maunium.net/go/tcell" + "go.mau.fi/mauview" + "go.mau.fi/tcell" ) type CodeBlockEntity struct { diff --git a/ui/messages/html/container.go b/ui/messages/html/container.go index 7e8fb0c..e9a003a 100644 --- a/ui/messages/html/container.go +++ b/ui/messages/html/container.go @@ -20,7 +20,7 @@ import ( "fmt" "strings" - "maunium.net/go/mauview" + "go.mau.fi/mauview" ) type ContainerEntity struct { diff --git a/ui/messages/html/entity.go b/ui/messages/html/entity.go index d95e0eb..f2e33eb 100644 --- a/ui/messages/html/entity.go +++ b/ui/messages/html/entity.go @@ -17,8 +17,8 @@ package html import ( - "maunium.net/go/mauview" - "maunium.net/go/tcell" + "go.mau.fi/mauview" + "go.mau.fi/tcell" ) // AdjustStyleFunc is a lambda function type to edit an existing tcell Style. diff --git a/ui/messages/html/horizontalline.go b/ui/messages/html/horizontalline.go index 8db2e58..ce10003 100644 --- a/ui/messages/html/horizontalline.go +++ b/ui/messages/html/horizontalline.go @@ -19,7 +19,7 @@ package html import ( "strings" - "maunium.net/go/mauview" + "go.mau.fi/mauview" ) type HorizontalLineEntity struct { diff --git a/ui/messages/html/list.go b/ui/messages/html/list.go index 669ff31..c101bdb 100644 --- a/ui/messages/html/list.go +++ b/ui/messages/html/list.go @@ -21,8 +21,9 @@ import ( "math" "strings" + "go.mau.fi/mauview" + "maunium.net/go/gomuks/ui/widget" - "maunium.net/go/mauview" ) type ListEntity struct { diff --git a/ui/messages/html/parser.go b/ui/messages/html/parser.go index 4c44d35..b1b3433 100644 --- a/ui/messages/html/parser.go +++ b/ui/messages/html/parser.go @@ -28,11 +28,11 @@ import ( "github.com/lucasb-eyer/go-colorful" "golang.org/x/net/html" + "go.mau.fi/tcell" + "maunium.net/go/mautrix/event" "maunium.net/go/mautrix/id" - "maunium.net/go/tcell" - "maunium.net/go/gomuks/config" "maunium.net/go/gomuks/matrix/rooms" "maunium.net/go/gomuks/ui/widget" @@ -60,7 +60,7 @@ func AdjustStyleUnderline(style tcell.Style) tcell.Style { } func AdjustStyleStrikethrough(style tcell.Style) tcell.Style { - return style.Strikethrough(true) + return style.StrikeThrough(true) } func AdjustStyleTextColor(color tcell.Color) func(tcell.Style) tcell.Style { diff --git a/ui/messages/html/text.go b/ui/messages/html/text.go index 5236d17..ec41408 100644 --- a/ui/messages/html/text.go +++ b/ui/messages/html/text.go @@ -22,8 +22,9 @@ import ( "github.com/mattn/go-runewidth" + "go.mau.fi/mauview" + "maunium.net/go/gomuks/ui/widget" - "maunium.net/go/mauview" ) type TextEntity struct { diff --git a/ui/messages/htmlmessage.go b/ui/messages/htmlmessage.go index b9366e4..ea84bd3 100644 --- a/ui/messages/htmlmessage.go +++ b/ui/messages/htmlmessage.go @@ -17,9 +17,10 @@ package messages import ( + "go.mau.fi/mauview" + "go.mau.fi/tcell" + "maunium.net/go/gomuks/matrix/muksevt" - "maunium.net/go/mauview" - "maunium.net/go/tcell" "maunium.net/go/gomuks/config" "maunium.net/go/gomuks/ui/messages/html" diff --git a/ui/messages/parser.go b/ui/messages/parser.go index e674d74..59af0c6 100644 --- a/ui/messages/parser.go +++ b/ui/messages/parser.go @@ -20,12 +20,13 @@ import ( "fmt" "strings" + "go.mau.fi/tcell" + "maunium.net/go/mautrix/event" "maunium.net/go/mautrix/id" - "maunium.net/go/tcell" "maunium.net/go/gomuks/debug" - "maunium.net/go/gomuks/interface" + ifc "maunium.net/go/gomuks/interface" "maunium.net/go/gomuks/matrix/muksevt" "maunium.net/go/gomuks/matrix/rooms" "maunium.net/go/gomuks/ui/messages/html" diff --git a/ui/messages/redactedmessage.go b/ui/messages/redactedmessage.go index d50d40f..dc61c65 100644 --- a/ui/messages/redactedmessage.go +++ b/ui/messages/redactedmessage.go @@ -17,9 +17,10 @@ package messages import ( + "go.mau.fi/mauview" + "go.mau.fi/tcell" + "maunium.net/go/gomuks/matrix/muksevt" - "maunium.net/go/mauview" - "maunium.net/go/tcell" "maunium.net/go/gomuks/config" ) @@ -55,6 +56,7 @@ func (msg *RedactedMessage) Height() int { const RedactionChar = '█' const RedactionMaxWidth = 40 + var RedactionStyle = tcell.StyleDefault.Foreground(tcell.NewRGBColor(50, 0, 0)) func (msg *RedactedMessage) Draw(screen mauview.Screen) { diff --git a/ui/messages/textmessage.go b/ui/messages/textmessage.go index 79bf87e..2fe0cbd 100644 --- a/ui/messages/textmessage.go +++ b/ui/messages/textmessage.go @@ -20,8 +20,8 @@ import ( "fmt" "time" + "go.mau.fi/mauview" "maunium.net/go/gomuks/matrix/muksevt" - "maunium.net/go/mauview" "maunium.net/go/gomuks/config" "maunium.net/go/gomuks/ui/messages/tstring" diff --git a/ui/messages/tstring/cell.go b/ui/messages/tstring/cell.go index 2b1a716..4ed3735 100644 --- a/ui/messages/tstring/cell.go +++ b/ui/messages/tstring/cell.go @@ -18,9 +18,9 @@ package tstring import ( "github.com/mattn/go-runewidth" - "maunium.net/go/mauview" - "maunium.net/go/tcell" + "go.mau.fi/mauview" + "go.mau.fi/tcell" ) type Cell struct { diff --git a/ui/messages/tstring/string.go b/ui/messages/tstring/string.go index ee86a92..df51d5d 100644 --- a/ui/messages/tstring/string.go +++ b/ui/messages/tstring/string.go @@ -22,9 +22,8 @@ import ( "github.com/mattn/go-runewidth" - "maunium.net/go/mauview" - - "maunium.net/go/tcell" + "go.mau.fi/mauview" + "go.mau.fi/tcell" ) type TString []Cell diff --git a/ui/no-crypto-commands.go b/ui/no-crypto-commands.go index 1c709ca..b98d277 100644 --- a/ui/no-crypto-commands.go +++ b/ui/no-crypto-commands.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// +build !cgo +//go:build !cgo package ui diff --git a/ui/password-modal.go b/ui/password-modal.go index 4a9f25f..ceb2f7c 100644 --- a/ui/password-modal.go +++ b/ui/password-modal.go @@ -20,8 +20,8 @@ import ( "fmt" "strings" - "maunium.net/go/mauview" - "maunium.net/go/tcell" + "go.mau.fi/mauview" + "go.mau.fi/tcell" ) type PasswordModal struct { diff --git a/ui/room-list.go b/ui/room-list.go index 027d86b..1de37ae 100644 --- a/ui/room-list.go +++ b/ui/room-list.go @@ -24,9 +24,10 @@ import ( sync "github.com/sasha-s/go-deadlock" + "go.mau.fi/mauview" + "go.mau.fi/tcell" + "maunium.net/go/mautrix/id" - "maunium.net/go/mauview" - "maunium.net/go/tcell" "maunium.net/go/gomuks/debug" "maunium.net/go/gomuks/matrix/rooms" diff --git a/ui/room-view.go b/ui/room-view.go index ec76a82..01a4080 100644 --- a/ui/room-view.go +++ b/ui/room-view.go @@ -27,8 +27,8 @@ import ( "github.com/mattn/go-runewidth" "github.com/zyedidia/clipboard" - "maunium.net/go/mauview" - "maunium.net/go/tcell" + "go.mau.fi/mauview" + "go.mau.fi/tcell" "maunium.net/go/mautrix" "maunium.net/go/mautrix/crypto/attachment" diff --git a/ui/syncing-modal.go b/ui/syncing-modal.go index 9696d8a..646d479 100644 --- a/ui/syncing-modal.go +++ b/ui/syncing-modal.go @@ -19,7 +19,7 @@ package ui import ( "time" - "maunium.net/go/mauview" + "go.mau.fi/mauview" ) type SyncingModal struct { diff --git a/ui/tag-room-list.go b/ui/tag-room-list.go index 8d1e0e5..1a01d5d 100644 --- a/ui/tag-room-list.go +++ b/ui/tag-room-list.go @@ -22,9 +22,10 @@ import ( "math" "strconv" + "go.mau.fi/mauview" + "go.mau.fi/tcell" + "maunium.net/go/gomuks/debug" - "maunium.net/go/mauview" - "maunium.net/go/tcell" "maunium.net/go/gomuks/matrix/rooms" "maunium.net/go/gomuks/ui/widget" diff --git a/ui/ui.go b/ui/ui.go index 55cd5fb..2bbff96 100644 --- a/ui/ui.go +++ b/ui/ui.go @@ -22,10 +22,10 @@ import ( "github.com/zyedidia/clipboard" - "maunium.net/go/mauview" - "maunium.net/go/tcell" + "go.mau.fi/mauview" + "go.mau.fi/tcell" - "maunium.net/go/gomuks/interface" + ifc "maunium.net/go/gomuks/interface" ) type View string diff --git a/ui/verification-modal.go b/ui/verification-modal.go index 86ea90a..0959474 100644 --- a/ui/verification-modal.go +++ b/ui/verification-modal.go @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// +build cgo +//go:build cgo package ui @@ -24,13 +24,14 @@ import ( "strings" "time" - "maunium.net/go/mauview" - "maunium.net/go/tcell" + "go.mau.fi/mauview" + "go.mau.fi/tcell" + + "maunium.net/go/mautrix/crypto" + "maunium.net/go/mautrix/event" "maunium.net/go/gomuks/config" "maunium.net/go/gomuks/debug" - "maunium.net/go/mautrix/crypto" - "maunium.net/go/mautrix/event" ) type EmojiView struct { diff --git a/ui/view-login.go b/ui/view-login.go index ec07ee4..fec99ec 100644 --- a/ui/view-login.go +++ b/ui/view-login.go @@ -19,15 +19,15 @@ package ui import ( "math" - "maunium.net/go/mautrix/id" - "maunium.net/go/tcell" + "go.mau.fi/mauview" + "go.mau.fi/tcell" "maunium.net/go/mautrix" - "maunium.net/go/mauview" + "maunium.net/go/mautrix/id" "maunium.net/go/gomuks/config" "maunium.net/go/gomuks/debug" - "maunium.net/go/gomuks/interface" + ifc "maunium.net/go/gomuks/interface" ) type LoginView struct { diff --git a/ui/view-main.go b/ui/view-main.go index df28742..6086fc4 100644 --- a/ui/view-main.go +++ b/ui/view-main.go @@ -25,19 +25,19 @@ import ( sync "github.com/sasha-s/go-deadlock" - "maunium.net/go/mauview" - "maunium.net/go/tcell" + "go.mau.fi/mauview" + "go.mau.fi/tcell" - "maunium.net/go/gomuks/ui/messages" "maunium.net/go/mautrix/id" + "maunium.net/go/mautrix/pushrules" "maunium.net/go/gomuks/config" "maunium.net/go/gomuks/debug" ifc "maunium.net/go/gomuks/interface" "maunium.net/go/gomuks/lib/notification" "maunium.net/go/gomuks/matrix/rooms" + "maunium.net/go/gomuks/ui/messages" "maunium.net/go/gomuks/ui/widget" - "maunium.net/go/mautrix/pushrules" ) type MainView struct { @@ -189,7 +189,7 @@ func (view *MainView) OnKeyEvent(event mauview.KeyEvent) bool { msgView := view.currentRoom.MessageView() msgView.AddScrollOffset(-msgView.TotalHeight()) case "add_newline": - return view.flex.OnKeyEvent(tcell.NewEventKey(tcell.KeyEnter, '\n', event.Modifiers()|tcell.ModShift, "")) + return view.flex.OnKeyEvent(tcell.NewEventKey(tcell.KeyEnter, '\n', event.Modifiers()|tcell.ModShift)) case "next_active_room": view.SwitchRoom(view.roomList.NextWithActivity()) case "show_bare": diff --git a/ui/widget/border.go b/ui/widget/border.go index 4be8226..eab22dd 100644 --- a/ui/widget/border.go +++ b/ui/widget/border.go @@ -17,8 +17,8 @@ package widget import ( - "maunium.net/go/mauview" - "maunium.net/go/tcell" + "go.mau.fi/mauview" + "go.mau.fi/tcell" ) // Border is a simple tview widget that renders a horizontal or vertical bar. diff --git a/ui/widget/color.go b/ui/widget/color.go index 6beb7d9..b8dad7e 100644 --- a/ui/widget/color.go +++ b/ui/widget/color.go @@ -20,7 +20,7 @@ import ( "fmt" "hash/fnv" - "maunium.net/go/tcell" + "go.mau.fi/tcell" "maunium.net/go/mautrix/id" ) diff --git a/ui/widget/util.go b/ui/widget/util.go index 35dd73c..91d6a8b 100644 --- a/ui/widget/util.go +++ b/ui/widget/util.go @@ -22,8 +22,8 @@ import ( "github.com/mattn/go-runewidth" - "maunium.net/go/mauview" - "maunium.net/go/tcell" + "go.mau.fi/mauview" + "go.mau.fi/tcell" ) func WriteLineSimple(screen mauview.Screen, line string, x, y int) {