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 // Screen Events
case event.SCREEN_RESOLUTION: case event.SCREEN_RESOLUTION:
err = h.screenResolution(session) err = h.screenSize(session)
case event.SCREEN_CONFIGURATIONS: case event.SCREEN_CONFIGURATIONS:
err = h.screenConfigurations(session) err = h.screenConfigurations(session)
case event.SCREEN_SET: case event.SCREEN_SET:
payload := &message.ScreenResolution{} payload := &message.ScreenResolution{}
err = utils.Unmarshal(payload, raw, func() error { err = utils.Unmarshal(payload, raw, func() error {
return h.screenSet(session, payload) return h.screenSizeChange(session, payload)
}) })
// Boradcast Events // Boradcast Events

View File

@ -6,7 +6,7 @@ import (
"demodesk/neko/internal/types/message" "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() { if !session.Admin() {
h.logger.Debug().Msg("user not admin") h.logger.Debug().Msg("user not admin")
return nil return nil
@ -27,7 +27,7 @@ func (h *MessageHandlerCtx) screenSet(session types.Session, payload *message.Sc
}, nil) }, nil)
} }
func (h *MessageHandlerCtx) screenResolution(session types.Session) error { func (h *MessageHandlerCtx) screenSize(session types.Session) error {
size := h.desktop.GetScreenSize() size := h.desktop.GetScreenSize()
if size == nil { if size == nil {
h.logger.Debug().Msg("could not get screen size") 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 return err
} }
// send current screen resolution // send current screen size
if err := h.screenResolution(session); err != nil { if err := h.screenSize(session); err != nil {
return err return err
} }