diff --git a/Linphone/core/chat/message/EventLogList.cpp b/Linphone/core/chat/message/EventLogList.cpp index 16831dfaf..ab10ab7ad 100644 --- a/Linphone/core/chat/message/EventLogList.cpp +++ b/Linphone/core/chat/message/EventLogList.cpp @@ -223,15 +223,20 @@ void EventLogList::findChatMessageWithFilter(QString filter, int startIndex, boo lInfo() << log().arg("searching event starting from index") << startIndex << "| event :" << (startEvent && startEvent->getChatMessageCore() ? startEvent->getChatMessageCore()->getText() : "null") - << "| filter :" << filter; + << "| filter :" << filter << "forward =" << forward; auto startEventModel = startEvent ? startEvent->getModel() : nullptr; mCoreModelConnection->invokeToModel([this, chatModel, startEventModel, filter, forward, isFirstResearch] { auto linStartEvent = startEventModel ? startEventModel->getEventLog() : nullptr; auto eventLog = chatModel->searchMessageByText(filter, linStartEvent, forward); - if (!eventLog) { + if (!eventLog && isFirstResearch) { + // event not found, search backward + lInfo() << log().arg("not found, search backward"); + eventLog = chatModel->searchMessageByText(filter, linStartEvent, !forward); + } + if (!eventLog && isFirstResearch) { // event not found, search in the entire history lInfo() << log().arg("not found, search in entire history"); - auto eventLog = chatModel->searchMessageByText(filter, nullptr, forward); + eventLog = chatModel->searchMessageByText(filter, nullptr, forward); } int index = -1; if (eventLog) { diff --git a/Linphone/data/languages/de.ts b/Linphone/data/languages/de.ts index 1575aff84..1f6c17ebc 100644 --- a/Linphone/data/languages/de.ts +++ b/Linphone/data/languages/de.ts @@ -6050,49 +6050,49 @@ Um sie in einem kommerziellen Projekt zu aktivieren, kontaktieren Sie uns bitte. ToolModel - + call_error_uninterpretable_sip_address "The calling address is not an interpretable SIP address : %1 Die Anrufadresse ist keine interpretierbare SIP-Adresse: %1 - + group_call_error_no_account Kein Standardkonto gefunden, Gruppengespräch kann nicht erstellt werden - + group_call_error_participants_invite Teilnehmer konnten nicht zum Gruppengespräch eingeladen werden - + group_call_error_creation Gruppengespräch konnte nicht erstellt werden - + voice_recording_duration "Voice recording (%1)" : %1 is the duration formated in mm:ss Sprachnachricht (%1) - + conference_invitation Meeting-Einladung - + conference_invitation_updated Meeting-Änderung - + conference_invitation_cancelled Meeting-Absage - + unknown_audio_device_name Unbekannter Gerätename diff --git a/Linphone/data/languages/en.ts b/Linphone/data/languages/en.ts index 1d3d30b12..f0c7c6bd1 100644 --- a/Linphone/data/languages/en.ts +++ b/Linphone/data/languages/en.ts @@ -5915,49 +5915,49 @@ To enable them in a commercial project, please contact us. ToolModel - + call_error_uninterpretable_sip_address "The calling address is not an interpretable SIP address : %1 The calling address is not an interpretable SIP address : %1 - + group_call_error_no_account No default account found, can't create group call - + group_call_error_participants_invite Couldn't invite participants to group call - + group_call_error_creation Group call couldn't be created - + voice_recording_duration "Voice recording (%1)" : %1 is the duration formated in mm:ss Voice recording (%1) - + unknown_audio_device_name Unknown device name - + conference_invitation Meeting invitation - + conference_invitation_cancelled Meeting cancellation - + conference_invitation_updated Meeting modification diff --git a/Linphone/data/languages/fr.ts b/Linphone/data/languages/fr.ts index 1bf24354a..c6b5c2d59 100644 --- a/Linphone/data/languages/fr.ts +++ b/Linphone/data/languages/fr.ts @@ -5886,49 +5886,49 @@ Pour les activer dans un projet commercial, merci de nous contacter. ToolModel - + call_error_uninterpretable_sip_address "The calling address is not an interpretable SIP address : %1 L'adresse n'est pas interprétable comme une adresse SIP - + group_call_error_no_account Impossible de créer l'appel de groupe, le compte par défaut n'est pas défini - + group_call_error_participants_invite Impossible d'inviter les participants à l'appel de groupe - + group_call_error_creation L'appel de groupe n'a pas pu être créé - + voice_recording_duration "Voice recording (%1)" : %1 is the duration formated in mm:ss Message vocal (%1) - + unknown_audio_device_name Appareil inconnu - + conference_invitation Invitation à une réunion - + conference_invitation_cancelled Annulation d'une réunion - + conference_invitation_updated Modification d'une réunion