Rename follows & followers to followCount & followerCount

This commit is contained in:
Christian Muehlhaeuser 2019-05-09 00:34:27 +02:00
parent a138f812a5
commit 32c5395556
No known key found for this signature in database
GPG key ID: 3CF9FA45CA1EBB7E
6 changed files with 30 additions and 30 deletions

View file

@ -37,14 +37,14 @@ type MessageEvent struct {
// ProfileEvent describes a profile event.
type ProfileEvent struct {
Username string
Name string
Avatar string
ProfileURL string
ProfileID string
Posts int64
Follows int64
Followers int64
Username string
Name string
Avatar string
ProfileURL string
ProfileID string
Posts int64
FollowCount int64
FollowerCount int64
}
// LoginEvent describes a login event.
@ -55,7 +55,7 @@ type LoginEvent struct {
ProfileURL string
ProfileID string
Posts int64
Follows int64
Followers int64
FollowCount int64
FollowerCount int64
PostSizeLimit int64
}

View file

@ -89,8 +89,8 @@ func (mod *Account) Run(eventChan chan interface{}) {
ProfileURL: mod.self.URL,
ProfileID: string(mod.self.ID),
Posts: mod.self.StatusesCount,
Follows: mod.self.FollowingCount,
Followers: mod.self.FollowersCount,
FollowCount: mod.self.FollowingCount,
FollowerCount: mod.self.FollowersCount,
PostSizeLimit: 500, // FIXME: retrieve from API, once possible
}
mod.evchan <- ev
@ -202,14 +202,14 @@ func (mod *Account) LoadAccount(id string) (accounts.ProfileEvent, []accounts.Me
}
p = accounts.ProfileEvent{
Username: a.Acct,
Name: a.DisplayName,
Avatar: a.Avatar,
ProfileURL: a.URL,
ProfileID: string(a.ID),
Posts: a.StatusesCount,
Follows: a.FollowingCount,
Followers: a.FollowersCount,
Username: a.Acct,
Name: a.DisplayName,
Avatar: a.Avatar,
ProfileURL: a.URL,
ProfileID: string(a.ID),
Posts: a.StatusesCount,
FollowCount: a.FollowingCount,
FollowerCount: a.FollowersCount,
}
tt, err := mod.client.GetAccountStatuses(context.Background(), mastodon.ID(id), &mastodon.Pagination{

View file

@ -34,8 +34,8 @@ type AccountBridge struct {
_ string `property:"profileURL"`
_ string `property:"profileID"`
_ int64 `property:"posts"`
_ int64 `property:"follows"`
_ int64 `property:"followers"`
_ int64 `property:"followCount"`
_ int64 `property:"followerCount"`
_ int64 `property:"postSizeLimit"`
_ *core.QAbstractListModel `property:"messages"`
@ -54,8 +54,8 @@ type ProfileBridge struct {
_ string `property:"profileURL"`
_ string `property:"profileID"`
_ int64 `property:"posts"`
_ int64 `property:"follows"`
_ int64 `property:"followers"`
_ int64 `property:"followCount"`
_ int64 `property:"followerCount"`
}
// ConfigBridge allows QML to access the app's config

View file

@ -124,8 +124,8 @@ func loadAccount(id string) {
profileBridge.SetProfileURL(profile.ProfileURL)
profileBridge.SetProfileID(profile.ProfileID)
profileBridge.SetPosts(profile.Posts)
profileBridge.SetFollows(profile.Follows)
profileBridge.SetFollowers(profile.Followers)
profileBridge.SetFollowCount(profile.FollowCount)
profileBridge.SetFollowerCount(profile.FollowerCount)
fmt.Println("Found account posts:", len(messages))
accountMessagesModel.Clear()

View file

@ -60,8 +60,8 @@ func handleEvents(eventsIn chan interface{}, messages *MessageModel, notificatio
accountBridge.SetProfileURL(event.ProfileURL)
accountBridge.SetProfileID(event.ProfileID)
accountBridge.SetPosts(event.Posts)
accountBridge.SetFollows(event.Follows)
accountBridge.SetFollowers(event.Followers)
accountBridge.SetFollowCount(event.FollowCount)
accountBridge.SetFollowerCount(event.FollowerCount)
accountBridge.SetPostSizeLimit(event.PostSizeLimit)
}
case accounts.MessageEvent:

View file

@ -56,13 +56,13 @@ ColumnLayout {
}
Label {
Layout.alignment: Qt.AlignCenter
text: "<b>" + profile.follows + "</b> Follows"
text: "<b>" + profile.followCount + "</b> Follows"
font.pixelSize: 11
elide: Label.ElideRight
}
Label {
Layout.alignment: Qt.AlignRight
text: "<b>" + profile.followers + "</b> Followers"
text: "<b>" + profile.followerCount + "</b> Followers"
font.pixelSize: 11
elide: Label.ElideRight
}