aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--boot.php2
-rw-r--r--view/tpl/cover_photo_widget.tpl4
2 files changed, 3 insertions, 3 deletions
diff --git a/boot.php b/boot.php
index 4426628bc..3c7ec2c6d 100644
--- a/boot.php
+++ b/boot.php
@@ -1270,7 +1270,7 @@ class App {
'$js_strings' => js_strings(),
'$zid' => get_my_address(),
'$channel_id' => self::$profile['uid'] ?? 0,
- '$auto_save_draft' => ((isset(self::$profile['uid']) && feature_enabled(self::$profile['uid'], 'auto_save_draft')) ? "true" : "false"),
+ '$auto_save_draft' => ((isset(self::$profile_uid) && feature_enabled(self::$profile_uid, 'auto_save_draft')) ? "true" : "false"),
'$module' => App::$module,
'$lang' => App::$language
]
diff --git a/view/tpl/cover_photo_widget.tpl b/view/tpl/cover_photo_widget.tpl
index e26bd607f..306dfe0b5 100644
--- a/view/tpl/cover_photo_widget.tpl
+++ b/view/tpl/cover_photo_widget.tpl
@@ -18,7 +18,7 @@
// Otherwise, set up the cover photo's size
coverPhoto.classList.remove('d-none');
- coverHeight = Math.ceil(window.innerWidth / 2.75862069);
+ coverHeight = Math.round(window.innerWidth / 2.75862069);
coverPhoto.style.height = `${coverHeight}px`;
datasrc2src('#cover-photo > img');
@@ -50,7 +50,7 @@
window.addEventListener('resize', function() {
if (!coverPhoto) return;
- coverHeight = Math.ceil(window.innerWidth / 2.75862069);
+ coverHeight = Math.round(window.innerWidth / 2.75862069);
coverPhoto.style.height = `${coverHeight}px`;
if (window.innerWidth < 755) {