loleaflet/src/map/Map.js | 5 +++++ wsd/DocumentBroker.cpp | 4 ++++ 2 files changed, 9 insertions(+)
New commits: commit ec1bc5807090dea9f28ef25c6211785c7fa1a00f Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Fri Jun 26 14:47:37 2020 +0300 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Fri Jun 26 14:42:34 2020 +0200 Don't show last modification indicator when data is unavailable E.g., SharePoint 2013 and 2016 don't support LastModifiedTime field in CheckFileInfo [1]. [1] https://docs.microsoft.com/en-us/openspecs/office_protocols/ms-wopi/e2e91eab-4c6d-4f00-9c3f-3a1962135626#Appendix_A_30 Change-Id: Icdcf9f82758b4bd34be25f553e9d756ab76b8bfa Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97221 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Andras Timar <andras.ti...@collabora.com> diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index 67bac9bfd..5f9882a53 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -386,6 +386,11 @@ L.Map = L.Evented.extend({ if (lastModButton !== null && lastModButton !== undefined && lastModButton.firstChild.innerHTML !== null && lastModButton.firstChild.childElementCount == 0) { + if (this._lastmodtime == null) { + // No modification time -> hide the indicator + lastModButton.innerHTML = ''; + return; + } var mainSpan = document.createElement('span'); var label = document.createTextNode(_('Last modification')); var separator = document.createTextNode(': '); diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp index fe99ed26a..f062e0145 100644 --- a/wsd/DocumentBroker.cpp +++ b/wsd/DocumentBroker.cpp @@ -74,6 +74,10 @@ void sendLastModificationTime(const std::shared_ptr<Session>& session, if (!session) return; + if (documentLastModifiedTime == std::chrono::system_clock::time_point()) + // No time from the storage (e.g., SharePoint 2013 and 2016) -> don't send + return; + std::stringstream stream; stream << "lastmodtime: " << documentLastModifiedTime; const std::string message = stream.str(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits