Sfoglia il codice sorgente

Don't render latest message if missing

Fixes #393
Danilo Bargen 7 anni fa
parent
commit
690fae046a

+ 5 - 1
src/directives/latest_message.html

@@ -1,4 +1,8 @@
-<div class="latest-message" ng-class="{'show-draft': ctrl.showDraft(), 'is-typing': ctrl.isTyping(), 'is-hidden': ctrl.isHidden()}">
+<div class="latest-message" ng-class="{
+    'show-draft': ctrl.showDraft(),
+    'is-typing': ctrl.isTyping(),
+    'is-hidden': ctrl.isHidden(),
+}">
 
     <!-- Typing indicator -->
     <div class="left typing">

+ 1 - 1
src/partials/messenger.navigation.html

@@ -95,7 +95,7 @@
 
                     <section class="message-box">
                         <eee-latest-message
-                            ng-show="!conversation.receiver.isTyping() && conversation.latestMessage"
+                            ng-if="!conversation.receiver.isTyping() && conversation.latestMessage"
                             ng-class="latest-message-text"
                             eee-type="conversation.type"
                             eee-receiver="conversation.receiver"