Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GO-4594: text gets deleted constantly when I'm typing #1929

Conversation

AnastasiaShemyakinskaya
Copy link
Member

  1. IsActive и IsFullDetailsSent returns slices now
  2. IsFullDetailSent is not overwrite if it's already set for subscription
  3. sFullDetailSent is set during subscriptions init (for sorted and simple sub)

Signed-off-by: AnastasiaShemyakinskaya <shem98a@mail.ru>
Signed-off-by: AnastasiaShemyakinskaya <shem98a@mail.ru>
@@ -0,0 +1,9 @@
package maputils
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Signed-off-by: AnastasiaShemyakinskaya <shem98a@mail.ru>
Copy link

github-actions bot commented Dec 10, 2024

Previous Coverage 50.4% of statements
New Coverage 50.4% of statements
Patch Coverage 95.4% of changed statements (62/65)

Coverage provided by https://github.com/seriousben/go-patch-cover-action

}
} else {
return false
// GetActive indicates that entry is inside the current pagination window for all of provided subscription IDs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment is outdated

}
} else {
return false
// GetFullDetailsSent that in the context of ALL provided subscriptions we have previously sent the full ObjectSetDetails event
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment is outdated


notActive := slice.Difference(info.subIds, active)
detailsNotSent := slice.Difference(info.subIds, detailsSent)
sentSetDetails = lo.Union(notActive, detailsNotSent)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

naming("sent") is confusing here, it is actually opposite. Maybe smth like "subIdsToSendFullDetails", "subIdsToSendDiffDetails"

return msgs
}

func (ctx *opCtx) addDetailsSentEvent(msgs []*pb.EventMessage, curr *entry, subIds, keys []string) []*pb.EventMessage {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

incorrect method naming

e.subIsActive[pos] = isActive
e.subFullDetailsSent[pos] = isFullDetailSent
e.subIsActive[subId] = isActive
if !e.subFullDetailsSent[subId] {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets add an explaining comment here, why don't we overwrite

Signed-off-by: AnastasiaShemyakinskaya <shem98a@mail.ru>
@AnastasiaShemyakinskaya AnastasiaShemyakinskaya merged commit 6999fea into main Dec 10, 2024
5 checks passed
@AnastasiaShemyakinskaya AnastasiaShemyakinskaya deleted the go-4594-text-gets-deleted-constantly-when-im-typing branch December 10, 2024 18:47
@github-actions github-actions bot locked and limited conversation to collaborators Dec 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants