@@ -1048,7 +1048,8 @@ function statusLabel(it){ const c=statusCls(it); return c==='incall'?'In a call'
function avatarHTML(it, big){
const isG=it.kind==='group';
const sz=big?'width:38px;height:38px;flex:0 0 38px;':'';
- const corner=isG?(it.members?''+(it.members>99?'99+':it.members)+'':'')
+ const corner=it.self?''
+ :isG?(it.members?''+(it.members>99?'99+':it.members)+'':'')
:'';
const inner=isG?ic('users',big?20:18):pEsc(initials(it.name));
// Photo overlay (BizGaze profile picture, or an uploaded group image). If it fails to
@@ -1077,9 +1078,13 @@ function renderChats(filter){
const rows=ROWS.filter(it=>!q||it.name.toLowerCase().includes(q)||(it.last_body||'').toLowerCase().includes(q))
.sort((a,b)=>(b.last_at-a.last_at)||a.name.localeCompare(b.name));
let html;
- if(!q){ // group favourites at the top when not searching
- const favs=rows.filter(r=>r.favorite), rest=rows.filter(r=>!r.favorite);
- html = rows.length ? ((favs.length?'
'+ic('star',12)+' Favourites
'+favs.map(rowHTML).join('')+(rest.length?'
All chats
':''):'')+rest.map(rowHTML).join('')) : '
No conversations yet.
';
+ if(!q){ // "You" pinned at top, then favourites, then the rest
+ const self=rows.find(r=>r.self), others=rows.filter(r=>!r.self);
+ const favs=others.filter(r=>r.favorite), rest=others.filter(r=>!r.favorite);
+ let h = self ? rowHTML(self) : '';
+ if(favs.length){ h+='