Improve error phrase about pin limit.
This commit is contained in:
		
							parent
							
								
									c4a0bc1fd5
								
							
						
					
					
						commit
						b3f8e27661
					
				
					 2 changed files with 7 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -2278,6 +2278,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
 | 
			
		|||
"lng_filters_type_no_muted" = "Muted";
 | 
			
		||||
"lng_filters_type_no_read" = "Read";
 | 
			
		||||
"lng_filters_icon_header" = "Choose icon";
 | 
			
		||||
"lng_filters_error_pinned_max" = "Sorry, you can't pin any more chats to the top.";
 | 
			
		||||
 | 
			
		||||
// Wnd specific
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -156,10 +156,12 @@ bool PinnedLimitReached(Dialogs::Key key, FilterId filterId) {
 | 
			
		|||
		owner->setChatPinned(key, FilterId(), true);
 | 
			
		||||
		entry->session().api().savePinnedOrder(folder);
 | 
			
		||||
	} else {
 | 
			
		||||
		const auto errorText = tr::lng_error_pinned_max(
 | 
			
		||||
			tr::now,
 | 
			
		||||
			lt_count,
 | 
			
		||||
			pinnedMax);
 | 
			
		||||
		const auto errorText = filterId
 | 
			
		||||
			? tr::lng_filters_error_pinned_max(tr::now)
 | 
			
		||||
			: tr::lng_error_pinned_max(
 | 
			
		||||
				tr::now,
 | 
			
		||||
				lt_count,
 | 
			
		||||
				pinnedMax);
 | 
			
		||||
		Ui::show(Box<InformBox>(errorText));
 | 
			
		||||
	}
 | 
			
		||||
	return true;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue