Commit b58226ba authored by Steffen van Bergerem's avatar Steffen van Bergerem Committed by Benjamin Neff

Load comments in mobile view when clicking comment button

closes #7207
parent c9d49c89
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
## Refactor ## Refactor
* Increase the spacing above and below post contents [#7267](https://github.com/diaspora/diaspora/pull/7267) * Increase the spacing above and below post contents [#7267](https://github.com/diaspora/diaspora/pull/7267)
* Replace fileuploader-custom with FineUploader [#7083](https://github.com/diaspora/diaspora/pull/7083) * Replace fileuploader-custom with FineUploader [#7083](https://github.com/diaspora/diaspora/pull/7083)
* Always show mobile reaction counts [#7207](https://github.com/diaspora/diaspora/pull/7207)
## Bug fixes ## Bug fixes
* Fix background color of year on notifications page with dark theme [#7263](https://github.com/diaspora/diaspora/pull/7263) * Fix background color of year on notifications page with dark theme [#7263](https://github.com/diaspora/diaspora/pull/7263)
......
...@@ -18,8 +18,19 @@ ...@@ -18,8 +18,19 @@
this.stream().on("tap click", "a.comment-action", function(evt) { this.stream().on("tap click", "a.comment-action", function(evt) {
evt.preventDefault(); evt.preventDefault();
self.showCommentBox($(this));
var bottomBar = $(this).closest(".bottom-bar").first(); var bottomBar = $(this).closest(".bottom-bar").first();
var toggleReactionsLink = bottomBar.find("a.show-comments").first();
if (toggleReactionsLink.length === 0) {
self.showCommentBox($(this));
} else {
if (toggleReactionsLink.hasClass("loading")) {
return;
}
if (!toggleReactionsLink.hasClass("active")) {
self.showComments(toggleReactionsLink);
}
}
var commentContainer = bottomBar.find(".comment-container").first(); var commentContainer = bottomBar.find(".comment-container").first();
self.scrollToOffset(commentContainer); self.scrollToOffset(commentContainer);
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment