Show correct tooltip on stopping recording.
This commit is contained in:
		
							parent
							
								
									8ba77defeb
								
							
						
					
					
						commit
						a8a85b2acf
					
				
					 4 changed files with 12 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -2000,6 +2000,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
 | 
			
		|||
"lng_group_call_recording_stop" = "Stop recording";
 | 
			
		||||
"lng_group_call_recording_started" = "Voice chat recording started.";
 | 
			
		||||
"lng_group_call_recording_stopped" = "Voice chat recording stopped.";
 | 
			
		||||
"lng_group_call_recording_saved" = "Audio saved to Saved Messages";
 | 
			
		||||
"lng_group_call_recording_start_sure" = "Do you want to start recording this chat and save the result into an audio file?\n\nOther members will see the chat is being recorded.";
 | 
			
		||||
"lng_group_call_recording_stop_sure" = "Do you want to stop recording this chat?";
 | 
			
		||||
"lng_group_call_recording_start_field" = "Recording Title";
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -903,6 +903,9 @@ void GroupCall::toggleRecording(bool enabled, const QString &title) {
 | 
			
		|||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (!enabled) {
 | 
			
		||||
		_recordingStoppedByMe = true;
 | 
			
		||||
	}
 | 
			
		||||
	using Flag = MTPphone_ToggleGroupCallRecord::Flag;
 | 
			
		||||
	_api.request(MTPphone_ToggleGroupCallRecord(
 | 
			
		||||
		MTP_flags((enabled ? Flag::f_start : Flag(0))
 | 
			
		||||
| 
						 | 
				
			
			@ -911,7 +914,9 @@ void GroupCall::toggleRecording(bool enabled, const QString &title) {
 | 
			
		|||
		MTP_string(title)
 | 
			
		||||
	)).done([=](const MTPUpdates &result) {
 | 
			
		||||
		_peer->session().api().applyUpdates(result);
 | 
			
		||||
		_recordingStoppedByMe = false;
 | 
			
		||||
	}).fail([=](const RPCError &error) {
 | 
			
		||||
		_recordingStoppedByMe = false;
 | 
			
		||||
	}).send();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -118,6 +118,9 @@ public:
 | 
			
		|||
	void handleUpdate(const MTPDupdateGroupCallParticipants &data);
 | 
			
		||||
	void changeTitle(const QString &title);
 | 
			
		||||
	void toggleRecording(bool enabled, const QString &title);
 | 
			
		||||
	[[nodiscard]] bool recordingStoppedByMe() const {
 | 
			
		||||
		return _recordingStoppedByMe;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	void setMuted(MuteState mute);
 | 
			
		||||
	void setMutedAndUpdate(MuteState mute);
 | 
			
		||||
| 
						 | 
				
			
			@ -261,6 +264,7 @@ private:
 | 
			
		|||
	base::flat_set<uint32> _unresolvedSsrcs;
 | 
			
		||||
	std::vector<tgcalls::GroupParticipantDescription> _preparedParticipants;
 | 
			
		||||
	bool _addPreparedParticipantsScheduled = false;
 | 
			
		||||
	bool _recordingStoppedByMe = false;
 | 
			
		||||
 | 
			
		||||
	MTP::DcId _broadcastDcId = 0;
 | 
			
		||||
	base::flat_map<not_null<LoadPartTask*>, LoadingPart> _broadcastParts;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -580,6 +580,8 @@ void GroupPanel::subscribeToChanges(not_null<Data::GroupCall*> real) {
 | 
			
		|||
			widget(),
 | 
			
		||||
			(recorded
 | 
			
		||||
				? tr::lng_group_call_recording_started(tr::now)
 | 
			
		||||
				: (_call && _call->recordingStoppedByMe())
 | 
			
		||||
				? tr::lng_group_call_recording_saved(tr::now)
 | 
			
		||||
				: tr::lng_group_call_recording_stopped(tr::now)));
 | 
			
		||||
	}, widget()->lifetime());
 | 
			
		||||
	validateRecordingMark(real->recordStartDate() != 0);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue