cmd/rpcfetch: update act in ui thread
This commit is contained in:
parent
8eb33b2fc0
commit
2c7d251298
@ -84,6 +84,7 @@ func apply() {
|
|||||||
act := *prof.Activity
|
act := *prof.Activity
|
||||||
s := &applyState{}
|
s := &applyState{}
|
||||||
|
|
||||||
|
fyne.DoAndWait(func() {
|
||||||
act.State = s.replace(act.State)
|
act.State = s.replace(act.State)
|
||||||
act.Details = s.replace(act.Details)
|
act.Details = s.replace(act.Details)
|
||||||
act.Timestamps = &discord.ActivityTimestamps{Start: launchTime.Unix()}
|
act.Timestamps = &discord.ActivityTimestamps{Start: launchTime.Unix()}
|
||||||
@ -93,6 +94,7 @@ func apply() {
|
|||||||
SmallImage: act.Assets.SmallImage,
|
SmallImage: act.Assets.SmallImage,
|
||||||
SmallText: s.replace(act.Assets.SmallText),
|
SmallText: s.replace(act.Assets.SmallText),
|
||||||
}
|
}
|
||||||
|
})
|
||||||
confLock.RUnlock()
|
confLock.RUnlock()
|
||||||
|
|
||||||
if nonce, err := retry(&act, s); err != nil {
|
if nonce, err := retry(&act, s); err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user