mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 03:20:48 +00:00
Fix channel stats overview
This commit is contained in:
parent
595dfd18c5
commit
857f508dea
@ -483,7 +483,7 @@ class StatsOverviewItemNode: ListViewItemNode {
|
||||
(sharesPerPostDelta.text, sharesPerPostDelta.positive ? .positive : .negative)
|
||||
)
|
||||
}
|
||||
if stats.reactionsPerPost.current > 0 || reactionsPerStoryDelta.hasValue {
|
||||
if stats.reactionsPerPost.current > 0 || reactionsPerPostDelta.hasValue {
|
||||
let index = hasStories ? 4 : 2
|
||||
items[index] = (
|
||||
compactNumericCountString(Int(stats.reactionsPerPost.current)),
|
||||
@ -492,17 +492,20 @@ class StatsOverviewItemNode: ListViewItemNode {
|
||||
)
|
||||
}
|
||||
if hasStories {
|
||||
items[1] = (
|
||||
let index = items[0] == nil ? 0 : 1
|
||||
items[index] = (
|
||||
compactNumericCountString(Int(stats.viewsPerStory.current)),
|
||||
item.presentationData.strings.Stats_ViewsPerStory,
|
||||
(viewsPerStoryDelta.text, viewsPerStoryDelta.positive ? .positive : .negative)
|
||||
)
|
||||
items[3] = (
|
||||
let sharesIndex = items[1] == nil ? 1 : 3
|
||||
items[sharesIndex] = (
|
||||
compactNumericCountString(Int(stats.sharesPerStory.current)),
|
||||
item.presentationData.strings.Stats_SharesPerStory,
|
||||
(sharesPerStoryDelta.text, sharesPerStoryDelta.positive ? .positive : .negative)
|
||||
)
|
||||
items[5] = (
|
||||
let reactionsIndex = items[3] == nil ? 2 : 5
|
||||
items[reactionsIndex] = (
|
||||
compactNumericCountString(Int(stats.reactionsPerStory.current)),
|
||||
item.presentationData.strings.Stats_ReactionsPerStory,
|
||||
(reactionsPerStoryDelta.text, reactionsPerStoryDelta.positive ? .positive : .negative)
|
||||
|
Loading…
x
Reference in New Issue
Block a user