| 135 | }); | 135 | }); |
| 136 | const hiddenChats = fragment.querySelectorAll('.recentChat.hidden'); | 136 | const hiddenChats = fragment.querySelectorAll('.recentChat.hidden'); |
| 137 | fragment.querySelectorAll('button.showMoreChats').forEach((button) => { | 137 | fragment.querySelectorAll('button.showMoreChats').forEach((button) => { |
| | 138 | const showRecentChatsTitle = t`Show more recent chats`; |
| | 139 | const hideRecentChatsTitle = t`Show less recent chats`; |
| | 140 | |
| | 141 | button.setAttribute('title', showRecentChatsTitle); |
| 138 | button.addEventListener('click', () => { | 142 | button.addEventListener('click', () => { |
| 139 | const rotate = button.classList.contains('rotated'); | 143 | const rotate = button.classList.contains('rotated'); |
| 140 | hiddenChats.forEach((chatItem) => { | 144 | hiddenChats.forEach((chatItem) => { |
| 141 | chatItem.classList.toggle('hidden', rotate); | 145 | chatItem.classList.toggle('hidden', rotate); |
| 142 | }); | 146 | }); |
| 143 | button.classList.toggle('rotated', !rotate); | 147 | button.classList.toggle('rotated', !rotate); |
| | 148 | button.setAttribute('title', rotate ? showRecentChatsTitle : hideRecentChatsTitle); |
| 144 | }); | 149 | }); |
| 145 | }); | 150 | }); |
| 146 | fragment.querySelectorAll('button.openTemporaryChat').forEach((button) => { | 151 | fragment.querySelectorAll('button.openTemporaryChat').forEach((button) => { |