Hide account name if it's the current one
This commit is contained in:
		
							parent
							
								
									11d72d6bd5
								
							
						
					
					
						commit
						d104608fbf
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
					@ -583,6 +583,12 @@ QString Manager::addTargetAccountName(
 | 
				
			||||||
		const QString &title,
 | 
							const QString &title,
 | 
				
			||||||
		not_null<Main::Session*> session) {
 | 
							not_null<Main::Session*> session) {
 | 
				
			||||||
	const auto add = [&] {
 | 
						const auto add = [&] {
 | 
				
			||||||
 | 
							if (const auto activeSession = Core::App().domain().active().maybeSession()) {
 | 
				
			||||||
 | 
								if (session == activeSession) {
 | 
				
			||||||
 | 
									return false;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		for (const auto &[index, account] : Core::App().domain().accounts()) {
 | 
							for (const auto &[index, account] : Core::App().domain().accounts()) {
 | 
				
			||||||
			if (const auto other = account->maybeSession()) {
 | 
								if (const auto other = account->maybeSession()) {
 | 
				
			||||||
				if (other != session) {
 | 
									if (other != session) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue