naming convention -> screen size.

This commit is contained in:
Miroslav Šedivý 2020-11-16 22:04:50 +01:00
parent 227b6b24c2
commit 99068b893b
3 changed files with 6 additions and 6 deletions

View File

@ -109,13 +109,13 @@ func (h *MessageHandlerCtx) Message(session types.Session, raw []byte) error {
// Screen Events
case event.SCREEN_RESOLUTION:
err = h.screenResolution(session)
err = h.screenSize(session)
case event.SCREEN_CONFIGURATIONS:
err = h.screenConfigurations(session)
case event.SCREEN_SET:
payload := &message.ScreenResolution{}
err = utils.Unmarshal(payload, raw, func() error {
return h.screenSet(session, payload)
return h.screenSizeChange(session, payload)
})
// Boradcast Events

View File

@ -6,7 +6,7 @@ import (
"demodesk/neko/internal/types/message"
)
func (h *MessageHandlerCtx) screenSet(session types.Session, payload *message.ScreenResolution) error {
func (h *MessageHandlerCtx) screenSizeChange(session types.Session, payload *message.ScreenResolution) error {
if !session.Admin() {
h.logger.Debug().Msg("user not admin")
return nil
@ -27,7 +27,7 @@ func (h *MessageHandlerCtx) screenSet(session types.Session, payload *message.Sc
}, nil)
}
func (h *MessageHandlerCtx) screenResolution(session types.Session) error {
func (h *MessageHandlerCtx) screenSize(session types.Session) error {
size := h.desktop.GetScreenSize()
if size == nil {
h.logger.Debug().Msg("could not get screen size")

View File

@ -47,8 +47,8 @@ func (h *MessageHandlerCtx) SessionConnected(session types.Session) error {
return err
}
// send current screen resolution
if err := h.screenResolution(session); err != nil {
// send current screen size
if err := h.screenSize(session); err != nil {
return err
}