diff --git a/webinterface.py b/webinterface.py
index 43d28261..27ad84d9 100644
--- a/webinterface.py
+++ b/webinterface.py
@@ -6542,6 +6542,54 @@ def headerButtonsTimeline(defaultTimeline: str,
inboxButton + '">' + translate['Inbox'] + \
''
+ # show todays events buttons on the first inbox page
+ happeningStr = ''
+ if boxName == 'inbox' and pageNumber == 1:
+ if todaysEventsCheck(baseDir, nickname, domain):
+ now = datetime.now()
+
+ # happening today button
+ if not iconsAsButtons:
+ happeningStr += \
+ '' + \
+ ''
+ else:
+ happeningStr += \
+ '' + \
+ ''
+
+ # happening this week button
+ if thisWeeksEventsCheck(baseDir, nickname, domain):
+ if not iconsAsButtons:
+ happeningStr += \
+ ''
+ else:
+ happeningStr += \
+ ''
+ else:
+ # happening this week button
+ if thisWeeksEventsCheck(baseDir, nickname, domain):
+ if not iconsAsButtons:
+ happeningStr += \
+ ''
+ else:
+ happeningStr += \
+ ''
+
if not newsHeader:
# button for the outbox
tlStr += \
@@ -6553,54 +6601,7 @@ def headerButtonsTimeline(defaultTimeline: str,
# add other buttons
tlStr += \
sharesButtonStr + bookmarksButtonStr + eventsButtonStr + \
- moderationButtonStr + newPostButtonStr
-
- # show todays events buttons on the first inbox page
- if boxName == 'inbox' and pageNumber == 1:
- if todaysEventsCheck(baseDir, nickname, domain):
- now = datetime.now()
-
- # happening today button
- if not iconsAsButtons:
- tlStr += \
- '' + \
- ''
- else:
- tlStr += \
- '' + \
- ''
-
- # happening this week button
- if thisWeeksEventsCheck(baseDir, nickname, domain):
- if not iconsAsButtons:
- tlStr += \
- ''
- else:
- tlStr += \
- ''
- else:
- # happening this week button
- if thisWeeksEventsCheck(baseDir, nickname, domain):
- if not iconsAsButtons:
- tlStr += \
- ''
- else:
- tlStr += \
- ''
+ moderationButtonStr + happeningStr + newPostButtonStr
if not newsHeader:
if not iconsAsButtons:
@@ -6665,6 +6666,8 @@ def headerButtonsTimeline(defaultTimeline: str,
'' + translate['Expand'] + \
''
+ tlStr += happeningStr
+
if newsHeader:
tlStr += \
'' + \