@@ -49,19 +49,19 @@ public PollResultsPopup(IClientService clientService, ISettingsService settingsS
4949 private void OnElementPrepared ( Microsoft . UI . Xaml . Controls . ItemsRepeater sender , Microsoft . UI . Xaml . Controls . ItemsRepeaterElementPreparedEventArgs args )
5050 {
5151 var item = sender . ItemsSourceView . GetAt ( args . Index ) ;
52- if ( item is MessageSender messageSender )
52+ if ( item is PollVoter pollVoter )
5353 {
5454 var button = args . Element as Button ;
5555 var content = button . Content as ProfileCell ;
5656
57- content . UpdateMessageSender ( _clientService , messageSender ) ;
57+ content . UpdatePollVoter ( _clientService , pollVoter ) ;
5858 button . Click += User_Click ;
5959
60- if ( _clientService . TryGetUser ( messageSender , out User user ) )
60+ if ( _clientService . TryGetUser ( pollVoter . VoterId , out User user ) )
6161 {
6262 AutomationProperties . SetName ( button , user . FullName ( ) ) ;
6363 }
64- else if ( _clientService . TryGetChat ( messageSender , out Chat chat ) )
64+ else if ( _clientService . TryGetChat ( pollVoter . VoterId , out Chat chat ) )
6565 {
6666 AutomationProperties . SetName ( button , chat . Title ) ;
6767 }
@@ -121,7 +121,7 @@ public PollResultViewModel(long chatId, long messageId, Poll poll, PollOption op
121121 _poll = poll ;
122122 _option = option ;
123123
124- Items = new MvxObservableCollection < MessageSender > ( ) ;
124+ Items = new MvxObservableCollection < PollVoter > ( ) ;
125125 LoadMoreCommand = new RelayCommand ( LoadMoreExecute ) ;
126126
127127 LoadMoreExecute ( ) ;
@@ -133,7 +133,7 @@ public PollResultViewModel(long chatId, long messageId, Poll poll, PollOption op
133133
134134 public PollType Type => _poll . Type ;
135135
136- public MvxObservableCollection < MessageSender > Items { get ; private set ; }
136+ public MvxObservableCollection < PollVoter > Items { get ; private set ; }
137137
138138 public RelayCommand LoadMoreCommand { get ; }
139139 private async void LoadMoreExecute ( )
@@ -142,14 +142,14 @@ private async void LoadMoreExecute()
142142 limit = _offset > 0 ? 50 : limit ;
143143
144144 var response = await ClientService . SendAsync ( new GetPollVoters ( _chatId , _messageId , _poll . Options . IndexOf ( _option ) , _offset , limit ) ) ;
145- if ( response is MessageSenders senders )
145+ if ( response is PollVoters senders )
146146 {
147- foreach ( var sender in senders . Senders )
147+ foreach ( var sender in senders . Voters )
148148 {
149149 Items . Add ( sender ) ;
150150 }
151151
152- _offset += senders . Senders . Count ;
152+ _offset += senders . Voters . Count ;
153153 _remaining = senders . TotalCount - _offset ;
154154
155155 RaisePropertyChanged ( nameof ( LoadMoreLabel ) ) ;
0 commit comments