Always show invited at the end of voice chat.
This commit is contained in:
		
							parent
							
								
									bcd2560e8f
								
							
						
					
					
						commit
						a576025d4f
					
				
					 1 changed files with 14 additions and 0 deletions
				
			
		| 
						 | 
					@ -750,7 +750,21 @@ void MembersController::updateRow(
 | 
				
			||||||
		if (row->speaking()) {
 | 
							if (row->speaking()) {
 | 
				
			||||||
			delegate()->peerListPrependRow(std::move(row));
 | 
								delegate()->peerListPrependRow(std::move(row));
 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
 | 
								static constexpr auto kInvited = Row::State::Invited;
 | 
				
			||||||
 | 
								const auto reorder = [&] {
 | 
				
			||||||
 | 
									const auto count = delegate()->peerListFullRowsCount();
 | 
				
			||||||
 | 
									if (!count) {
 | 
				
			||||||
 | 
										return false;
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
									const auto row = delegate()->peerListRowAt(count - 1).get();
 | 
				
			||||||
 | 
									return (static_cast<Row*>(row)->state() == kInvited);
 | 
				
			||||||
 | 
								}();
 | 
				
			||||||
			delegate()->peerListAppendRow(std::move(row));
 | 
								delegate()->peerListAppendRow(std::move(row));
 | 
				
			||||||
 | 
								if (reorder) {
 | 
				
			||||||
 | 
									delegate()->peerListPartitionRows([](const PeerListRow &row) {
 | 
				
			||||||
 | 
										return static_cast<const Row&>(row).state() != kInvited;
 | 
				
			||||||
 | 
									});
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		delegate()->peerListRefreshRows();
 | 
							delegate()->peerListRefreshRows();
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue