aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgit-marijus <mario@mariovavti.com>2017-07-22 12:46:02 +0200
committergit-marijus <mario@mariovavti.com>2017-07-22 12:46:02 +0200
commit16067db718b0746892a5c81782ee72e21554b62c (patch)
treef64f20520a9c08279f860b8aa39d5eac7eb8401e
parent363d8723260bfefb85611935fe60797f34e6db6a (diff)
downloadvolse-hubzilla-16067db718b0746892a5c81782ee72e21554b62c.tar.gz
volse-hubzilla-16067db718b0746892a5c81782ee72e21554b62c.tar.bz2
volse-hubzilla-16067db718b0746892a5c81782ee72e21554b62c.zip
show the right conversation active and do not show any conversation active if we compose a new one
-rw-r--r--Zotlabs/Widget/Conversations.php4
-rwxr-xr-xview/tpl/mail_list.tpl2
2 files changed, 4 insertions, 2 deletions
diff --git a/Zotlabs/Widget/Conversations.php b/Zotlabs/Widget/Conversations.php
index 4fd754f66..56510750f 100644
--- a/Zotlabs/Widget/Conversations.php
+++ b/Zotlabs/Widget/Conversations.php
@@ -40,6 +40,8 @@ class Conversations {
foreach($r as $rr) {
+ $selected = ((argc() == 3) ? intval(argv(2)) == intval($rr['id']) : $r[0]['id'] == $rr['id']);
+
$messages[] = array(
'mailbox' => $mailbox,
'id' => $rr['id'],
@@ -54,7 +56,7 @@ class Conversations {
'body' => $rr['body'],
'date' => datetime_convert('UTC',date_default_timezone_get(),$rr['created'], 'c'),
'seen' => $rr['seen'],
- 'selected' => ((argc() == 2) ? (intval(argv(1)) == intval($rr['id'])) : ($r[0]['id'] == $rr['id']))
+ 'selected' => ((argv(1) != 'new') ? $selected : '')
);
}
diff --git a/view/tpl/mail_list.tpl b/view/tpl/mail_list.tpl
index 827c7628f..65d8dcdb4 100755
--- a/view/tpl/mail_list.tpl
+++ b/view/tpl/mail_list.tpl
@@ -1,6 +1,6 @@
<li class="nav-item">
<a href="mail/{{$message.mailbox}}/{{$message.id}}" class="nav-link{{if $message.selected}} active{{/if}}">
- <span class="{{if $message.seen}}seen{{else}}unseen{{/if}}">{{$message.subject}}</span><br>
+ <span class="{{if ! $message.seen || $message.selected}}font-weight-bold{{/if}}">{{$message.subject}}</span><br>
<span class="conv-participants">{{$message.from_name}} > {{$message.to_name}}</span><br>
<span class="wall-item-ago autotime" title="{{$message.date}}">{{$message.date}}</span>
</a>