Refactoring
This commit is contained in:
@ -25,16 +25,21 @@ type MatrixContainer interface {
|
||||
Client() *gomatrix.Client
|
||||
InitClient() error
|
||||
Initialized() bool
|
||||
Login(user, password string) error
|
||||
|
||||
Start()
|
||||
Stop()
|
||||
|
||||
Login(user, password string) error
|
||||
|
||||
SendMessage(roomID, msgtype, message string) (string, error)
|
||||
SendMarkdownMessage(roomID, msgtype, message string) (string, error)
|
||||
SendTyping(roomID string, typing bool)
|
||||
JoinRoom(roomID string) (*rooms.Room, error)
|
||||
LeaveRoom(roomID string) error
|
||||
|
||||
GetHistory(roomID, prevBatch string, limit int) ([]gomatrix.Event, string, error)
|
||||
GetRoom(roomID string) *rooms.Room
|
||||
|
||||
Download(mxcURL string) ([]byte, string, string, error)
|
||||
GetCachePath(homeserver, fileID string) string
|
||||
}
|
||||
|
@ -25,21 +25,13 @@ import (
|
||||
"maunium.net/go/tcell"
|
||||
)
|
||||
|
||||
type View string
|
||||
|
||||
// Allowed views in GomuksUI
|
||||
const (
|
||||
ViewLogin View = "login"
|
||||
ViewMain View = "main"
|
||||
)
|
||||
|
||||
type UIProvider func(gmx Gomuks) GomuksUI
|
||||
|
||||
type GomuksUI interface {
|
||||
Render()
|
||||
SetView(name View)
|
||||
OnLogin()
|
||||
OnLogout()
|
||||
MainView() MainView
|
||||
LoginView() LoginView
|
||||
|
||||
Init()
|
||||
Start() error
|
||||
@ -62,9 +54,6 @@ type MainView interface {
|
||||
NotifyMessage(room *rooms.Room, message Message, should pushrules.PushActionArrayShould)
|
||||
}
|
||||
|
||||
type LoginView interface {
|
||||
}
|
||||
|
||||
type MessageDirection int
|
||||
|
||||
const (
|
||||
|
Reference in New Issue
Block a user