JC Brand 5 年 前
コミット
9bff567b3c

+ 2 - 1
CHANGES.md

@@ -18,7 +18,8 @@
 - #129: Add support for [XEP-0156: Disovering Alternative XMPP Connection Methods](https://xmpp.org/extensions/xep-0156.html). Only XML is supported for now.
 - #1105: Preliminary support for storing persistent data in IndexedDB instead of localStorage
 - #1691: Fix `collection.chatbox is undefined` errors
-- #1772 `_converse.api.contact.add(jid, nick)` fails, says not a function
+- #1772: `_converse.api.contact.add(jid, nick)` fails, says not a function
+- #1796: Don't show "back" arrow navigation (on mobile) in the chat header when in `singleton` mode
 
 ### Breaking changes
 

+ 8 - 5
src/converse-muc-views.js

@@ -1038,12 +1038,15 @@ converse.plugins.add('converse-muc-views', {
                 }));
             },
 
+            /**
+             * Callback method that gets called after the chat has become visible.
+             * @private
+             * @method _converse.ChatRoomView#afterShown
+             */
             afterShown () {
-                /* Override from converse-chatview, specifically to avoid
-                 * the 'active' chat state from being sent out prematurely.
-                 *
-                 * This is instead done in `onConnectionStatusChanged` below.
-                 */
+                // Override from converse-chatview, specifically to avoid
+                // the 'active' chat state from being sent out prematurely.
+                // This is instead done in `onConnectionStatusChanged` below.
                 if (u.isPersistableModel(this.model)) {
                     this.model.clearUnreadMsgCounter();
                 }

+ 3 - 1
src/templates/chatbox_head.html

@@ -1,5 +1,7 @@
 <div class="chat-head chat-head-chatbox row no-gutters">
-    <div class="chatbox-navback"><i class="fa fa-arrow-left"></i></div>
+    {[ if (!o._converse.singleton) { ]}
+        <div class="chatbox-navback"><i class="fa fa-arrow-left"></i></div>
+    {[ } ]}
     <div class="chatbox-title">
         <div class="row no-gutters">
             {[ if (o.type !== o._converse.HEADLINES_TYPE) { ]}

+ 3 - 1
src/templates/chatroom_head.html

@@ -1,4 +1,6 @@
-<div class="chatbox-navback"><i class="fa fa-arrow-left"></i></div>
+{[ if (!o._converse.singleton) { ]}
+    <div class="chatbox-navback"><i class="fa fa-arrow-left"></i></div>
+{[ } ]}
 <div class="chatbox-title">
     <div class="chat-title" {[ if (o._converse.locked_muc_domain !== 'hidden') { ]} title="{{{o.jid}}}" {[ } ]} >
         {{{ o.title }}}