From 626b3395ab48c279001fc9688d83563f4289c9fc Mon Sep 17 00:00:00 2001 From: John Preston Date: Sat, 9 Mar 2024 10:57:17 +0400 Subject: [PATCH] Show 00:00-23:59 as "open 24 hours". --- Telegram/SourceFiles/data/business/data_business_common.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/data/business/data_business_common.cpp b/Telegram/SourceFiles/data/business/data_business_common.cpp index 7da2970db..06cb17e91 100644 --- a/Telegram/SourceFiles/data/business/data_business_common.cpp +++ b/Telegram/SourceFiles/data/business/data_business_common.cpp @@ -231,8 +231,9 @@ WorkingIntervals ExtractDayIntervals( } bool IsFullOpen(const WorkingIntervals &extractedDay) { - return extractedDay - && (extractedDay.list.front() == WorkingInterval{ 0, kDay }); + return extractedDay // 00:00-23:59 or 00:00-00:00 (next day) + && (extractedDay.list.front() == WorkingInterval{ 0, kDay - 60 } + || extractedDay.list.front() == WorkingInterval{ 0, kDay }); } WorkingIntervals RemoveDayIntervals(