chore: remove old and unused code
This commit is contained in:
16
tui.go
16
tui.go
@@ -102,13 +102,15 @@ type detailsLoadedMsg struct {
|
||||
}
|
||||
|
||||
type branchesLoadedMsg struct {
|
||||
owner string
|
||||
repo string
|
||||
branches []RepositoryBranch
|
||||
err error
|
||||
generation uint64
|
||||
owner string
|
||||
repo string
|
||||
branches []RepositoryBranch
|
||||
err error
|
||||
}
|
||||
|
||||
type repositoryUsersLoadedMsg struct {
|
||||
generation uint64
|
||||
owner, repo string
|
||||
users []RepositoryUser
|
||||
err error
|
||||
@@ -171,6 +173,7 @@ type App struct {
|
||||
prEditUsersLoading bool
|
||||
prEditUsersError string
|
||||
prEditUserIndex int
|
||||
prEditGeneration uint64
|
||||
cursorOutput *terminalCursorOutput
|
||||
|
||||
foldResolved bool
|
||||
@@ -209,6 +212,7 @@ type App struct {
|
||||
aiProgress AIRunProgress
|
||||
aiSpinner int
|
||||
aiEvents <-chan tea.Msg
|
||||
aiGeneration uint64
|
||||
difflet diffletModel
|
||||
mutations *mutationQueueStore
|
||||
mutationReplayBusy bool
|
||||
@@ -1049,7 +1053,7 @@ func (m App) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
}
|
||||
return m, tea.Batch(m.startMutationReplay(), m.difflet.setState(diffletSuccess))
|
||||
case branchesLoadedMsg:
|
||||
if m.writeMode != writePREdit ||
|
||||
if msg.generation != m.prEditGeneration || m.writeMode != writePREdit ||
|
||||
msg.owner != m.details.Owner || msg.repo != m.details.Repository {
|
||||
return m, nil
|
||||
}
|
||||
@@ -1065,7 +1069,7 @@ func (m App) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
m.prEditBranchIndex = 0
|
||||
m.ensurePREditCursorVisible()
|
||||
case repositoryUsersLoadedMsg:
|
||||
if m.writeMode != writePREdit ||
|
||||
if msg.generation != m.prEditGeneration || m.writeMode != writePREdit ||
|
||||
msg.owner != m.details.Owner || msg.repo != m.details.Repository {
|
||||
return m, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user