Skip to content

Commit

Permalink
fixup! add sorting capabilities to mail
Browse files Browse the repository at this point in the history
Signed-off-by: hamza221 <[email protected]>
  • Loading branch information
hamza221 committed Oct 27, 2023
1 parent c969a22 commit 26c44a7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 44 deletions.
20 changes: 0 additions & 20 deletions lib/Db/MessageMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -891,26 +891,6 @@ public function findIdsByQuery(Mailbox $mailbox, SearchQuery $query, string $sor
return $result;
}

public function findLastMessageTimestamp(Account $account, Mailbox $mailbox, ?SearchQuery $query, string $sortOrder): ?int {
if ($query !== null) {
$lastMessageId = $this->findIdsByQuery($mailbox, $query, $sortOrder, 1)[0] ?? null;
} else {
$lastMessageId = $this->findAllIds($mailbox)[0] ?? null;
}
if ($lastMessageId === null) {
return null;
}

$lastMessages = $this->findByIds($account->getUserId(), [$lastMessageId], $sortOrder);
if (empty($lastMessages)) {
// Should never happen
return null;
}
return $lastMessages[0]->getSentAt();
}



public function findIdsGloballyByQuery(IUser $user, SearchQuery $query, ?int $limit, array $uids = null): array {
$qb = $this->db->getQueryBuilder();
$qbMailboxes = $this->db->getQueryBuilder();
Expand Down
24 changes: 0 additions & 24 deletions src/components/MenuEnvelope.vue
Original file line number Diff line number Diff line change
Expand Up @@ -237,30 +237,6 @@
{{ t('spreed', 'Set custom snooze') }}
</NcActionButton>
</template>
<Modal v-if="showSourceModal" class="source-modal" @close="onCloseSourceModal">
<div class="source-modal-content">
<div class="section">
<h2>{{ t('mail', 'Message source') }}</h2>
<pre class="message-source">{{ rawMessage }}</pre>
</div>
</div>
</Modal>
<MoveModal v-if="showMoveModal"
:account="account"
:envelopes="[envelope]"
@move="onMove"
@close="onCloseMoveModal" />
<EventModal v-if="showEventModal"
:envelope="envelope"
@close="showEventModal = false" />
<TaskModal v-if="showTaskModal"
:envelope="envelope"
@close="showTaskModal = false" />
<TagModal
v-if="showTagModal"
:account="account"
:envelopes="[envelope]"
@close="onCloseTagModal" />
</div>
</template>

Expand Down

0 comments on commit 26c44a7

Please sign in to comment.