badges

package
v2.6.2+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2018 License: BSD-3-Clause, BSD-3-Clause Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BadgeState

type BadgeState struct {
	sync.Mutex
	// contains filtered or unexported fields
}

BadgeState represents the number of badges on the app. It's threadsafe. Useable from both the client service and gregor server. See service:Badger for the service part that owns this.

func NewBadgeState

func NewBadgeState(log logger.Logger) *BadgeState

NewBadgeState creates a new empty BadgeState.

func (*BadgeState) Clear

func (b *BadgeState) Clear()

func (*BadgeState) Export

func (b *BadgeState) Export() (keybase1.BadgeState, error)

Exports the state summary

func (*BadgeState) FindResetMemberBadges added in v1.0.42

func (b *BadgeState) FindResetMemberBadges(teamName string) (badges []keybase1.TeamMemberOutReset)

func (*BadgeState) UpdateWithChat

func (b *BadgeState) UpdateWithChat(ctx context.Context, update chat1.UnreadUpdate,
	inboxVers chat1.InboxVers)

func (*BadgeState) UpdateWithChatFull

func (b *BadgeState) UpdateWithChatFull(ctx context.Context, update chat1.UnreadUpdateFull)

func (*BadgeState) UpdateWithGregor

func (b *BadgeState) UpdateWithGregor(ctx context.Context, gstate gregor.State) error

UpdateWithGregor updates the badge state from a gregor state.

type Badger

type Badger struct {
	libkb.Contextified
	// contains filtered or unexported fields
}

Badger keeps a BadgeState up to date and broadcasts it to electron. This is the client-specific glue. The state is kept up to date by subscribing to: - All gregor state updates - All chat.activity gregor OOBMs - Logout

func NewBadger

func NewBadger(g *libkb.GlobalContext) *Badger

func (*Badger) Clear

func (b *Badger) Clear(ctx context.Context)

func (*Badger) PushChatUpdate

func (b *Badger) PushChatUpdate(ctx context.Context, update chat1.UnreadUpdate, inboxVers chat1.InboxVers)

func (*Badger) PushState

func (b *Badger) PushState(ctx context.Context, state gregor1.State)

func (*Badger) Resync

func (b *Badger) Resync(ctx context.Context, chatRemote func() chat1.RemoteInterface,
	gcli *grclient.Client, update *chat1.UnreadUpdateFull) (err error)

func (*Badger) Send

func (b *Badger) Send(ctx context.Context) error

Send the badgestate to electron

func (*Badger) SetInboxVersionSource added in v1.0.27

func (b *Badger) SetInboxVersionSource(s InboxVersionSource)

func (*Badger) State

func (b *Badger) State() *BadgeState

type InboxVersionSource added in v1.0.27

type InboxVersionSource interface {
	GetInboxVersion(context.Context, gregor1.UID) (chat1.InboxVers, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL