Skip to content
Snippets Groups Projects
Commit f15233b3 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

draft: Implement new design for the draft indicator

GitLab: #427
Change-Id: I73818240946ab7c42eb238c50ca0f38061ff13d9
parent 29c758a1
No related branches found
Tags beta/202310101006
No related merge requests found
......@@ -90,15 +90,8 @@ ConversationListModelBase::dataForItem(item_t item, int role) const
return {};
}
case Role::Draft: {
if (!item.uid.isEmpty()) {
const auto draft = lrcInstance_->getContentDraft(item.uid, item.accountId);
if (!draft.isEmpty()) {
// Pencil Emoji
uint cp = 0x270F;
auto emojiString = QString::fromUcs4(reinterpret_cast<char32_t*>(&cp), 1);
return emojiString + draft;
}
}
if (!item.uid.isEmpty())
return lrcInstance_->getContentDraft(item.uid, item.accountId);
return {};
}
case Role::IsRequest:
......
......@@ -36,6 +36,8 @@ ItemDelegate {
property string accountId: ""
property string convId: ""
highlighted: ListView.isCurrentItem
onVisibleChanged: {
if (visible)
return
......@@ -129,6 +131,13 @@ ItemDelegate {
color: JamiTheme.primaryForegroundColor
}
// Draft indicator
ResponsiveImage {
visible: Draft && !root.highlighted
source: JamiResources.round_edit_24dp_svg
color: JamiTheme.primaryForegroundColor
}
ColumnLayout {
Layout.fillHeight: true
spacing: 2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment