1
0
mirror of https://github.com/flarum/core.git synced 2025-07-12 04:16:24 +02:00

Extract a few changes from the Mithril 2 upgrade (#2262)

* Fix closing the composer with ESC key

Regression from #2161.

* Remove obsolete method

Regression from #2162.

* Mark method as protected

* Fade in posts in post stream using CSS

This also avoids a double-fade from the JavaScript code, which was
probably introduced in #2160.

* Fix fadeIn for post stream items

Co-authored-by: Alexander Skvortsov <sasha.skvortsov109@gmail.com>
This commit is contained in:
Franz Liedke
2020-08-16 22:32:59 +02:00
committed by GitHub
parent 22bf03d872
commit c39b6a6d2f
5 changed files with 13 additions and 10 deletions

View File

@ -24,11 +24,6 @@ export default class PostStream extends Component {
}
view() {
function fadeIn(element, isInitialized, context) {
if (!context.fadedIn) $(element).hide().fadeIn();
context.fadedIn = true;
}
let lastTime;
const viewingEnd = this.stream.viewingEnd();
@ -45,7 +40,6 @@ export default class PostStream extends Component {
content = PostComponent ? PostComponent.component({ post }) : '';
attrs.key = 'post' + post.id();
attrs.config = fadeIn;
attrs['data-time'] = time.toISOString();
attrs['data-number'] = post.number();
attrs['data-id'] = post.id();