@@ -230,10 +230,10 @@ func (h *Handler) remindEditQuery(ctx context.Context, b *bot.Bot, update *model
230230 var offset time.Duration
231231 switch reminderType {
232232 case domain .ReminderTypeTomorrow :
233- offset = chat .Reminder .Tomorrow .Offset
233+ offset = chat .Reminder .Tomorrow .Offset . Duration ()
234234 messageText = fmt .Sprintf ("%s - %s" , text .RemindEdit .TitleTomorrow , domain .FormatDuration (offset ))
235235 case domain .ReminderTypeSoon :
236- offset = chat .Reminder .Soon .Offset
236+ offset = chat .Reminder .Soon .Offset . Duration ()
237237 messageText = fmt .Sprintf ("%s - %s" , text .RemindEdit .TitleSoon , domain .FormatDuration (offset ))
238238 default :
239239 log .Error ("remindEditQuery: unknown reminder type" ,
@@ -281,11 +281,11 @@ func (h *Handler) remindAdjustQuery(ctx context.Context, b *bot.Bot, update *mod
281281
282282 switch reminderType {
283283 case domain .ReminderTypeTomorrow :
284- currentOffset = chat .Reminder .Tomorrow .Offset
284+ currentOffset = chat .Reminder .Tomorrow .Offset . Duration ()
285285 minOffset = TomorrowMinOffset
286286 maxOffset = TomorrowMaxOffset
287287 case domain .ReminderTypeSoon :
288- currentOffset = chat .Reminder .Soon .Offset
288+ currentOffset = chat .Reminder .Soon .Offset . Duration ()
289289 minOffset = SoonMinOffset
290290 maxOffset = SoonMaxOffset
291291 default :
@@ -309,9 +309,9 @@ func (h *Handler) remindAdjustQuery(ctx context.Context, b *bot.Bot, update *mod
309309
310310 switch reminderType {
311311 case domain .ReminderTypeTomorrow :
312- chat .Reminder .Tomorrow .Offset = newOffset
312+ chat .Reminder .Tomorrow .Offset = domain . Duration ( newOffset )
313313 case domain .ReminderTypeSoon :
314- chat .Reminder .Soon .Offset = newOffset
314+ chat .Reminder .Soon .Offset = domain . Duration ( newOffset )
315315 }
316316
317317 ctx = setContextChat (ctx , chat )
0 commit comments