Show ready-to-download documents in media gallery

This commit is contained in:
Fedor Indutny
2025-09-23 11:53:41 -07:00
committed by GitHub
parent e9ea20bb73
commit 9c97d3e73c
30 changed files with 481 additions and 314 deletions

9
ts/util/logPadSize.ts Normal file
View File

@@ -0,0 +1,9 @@
// Copyright 2025 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
export function logPadSize(size: number): number {
return Math.max(
541,
Math.floor(1.05 ** Math.ceil(Math.log(size) / Math.log(1.05)))
);
}