mirror of
https://github.com/IllusionMan1212/gorc.git
synced 2026-10-24 02:12:33 +00:00
fix: use .New() instead of the deprecated .NewModel() to init models
This commit is contained in:
@@ -51,16 +51,14 @@ type State struct {
|
||||
}
|
||||
|
||||
func NewMainScreen(client *client.Client) State {
|
||||
newViewport := &viewport.Model{
|
||||
HighPerformanceRendering: false,
|
||||
Wrap: viewport.Wrap,
|
||||
Style: MessagesStyle.Copy(),
|
||||
}
|
||||
newViewport := viewport.New(0, 0)
|
||||
newViewport.Wrap = viewport.Wrap
|
||||
newViewport.Style = MessagesStyle.Copy()
|
||||
|
||||
return State{
|
||||
ConnReader: nil,
|
||||
Client: client,
|
||||
Viewport: newViewport,
|
||||
Viewport: &newViewport,
|
||||
FocusIndex: InputBox,
|
||||
InputBox: NewInputBox(),
|
||||
SidePanel: NewSidePanel(client),
|
||||
|
||||
Reference in New Issue
Block a user