Conversation
Closes: BON-244
Closes: BON-107
Fixes: BON-255
Closes: BON-251
Closes: BON-256
| def localPropertiesFile = rootProject.file('local.properties') | ||
| def localProperties = new Properties() | ||
| if (localPropertiesFile.exists()) { | ||
| localProperties.load(localPropertiesFile.newDataInputStream()) |
There was a problem hiding this comment.
Стрим надо надо закрыть. В котлине я делал так, в Groovy надо посмотреть:
val localProperties = Properties()
val localPropertiesFile = rootProject.file("local.properties")
if (localPropertiesFile.exists()) {
localPropertiesFile.inputStream().use { localProperties.load(it) }
}| applicationId "sh.sit.bonfire" | ||
| applicationId appId |
There was a problem hiding this comment.
Не совсем понимаю смысл делать кастомный ID приложения, если в дебаг сборке и так добавляется в конец .debug
| ApiResources.EMOJI_1, | ||
| ApiResources.EMOJI_2, | ||
| ApiResources.EMOJI_3, | ||
| ApiResources.EMOJI_4, | ||
| ApiResources.EMOJI_5, | ||
| ApiResources.EMOJI_6, | ||
| ApiResources.EMOJI_7 |
|
|
||
| Android app | ||
| [](https://github.com/timas130/bonfire/actions) | ||
| [](https://discord.gg/QGcJrHknAp) |
There was a problem hiding this comment.
Дискорд неофициальный, нафиг его
| * [PostgreSQL database](https://postgresql.org/downloads) (the database should be named | ||
| "postgres") | ||
| * [MinIO server and client](https://min.io/open-source/download) |
There was a problem hiding this comment.
Вообще PostgreSQL и Minio проще запускать через тот же Docker. Можно просто сделать файл docker-compose.yml со всем сразу. Помимо этого Minio немного прифигели в последнее время, было бы неплохо найти что-то другое, но пока можно оставить, я сам исправлю как-нибудь.
| object ControllerModeration { | ||
| fun parseComment(comment: String, userId: Long = 0L): String { | ||
| if (ControllerCensor.containsSwearing(comment)) { | ||
| val trimmed = comment.trim() |
| var i = GregorianCalendar.getInstance().get(Calendar.DAY_OF_WEEK) - 2 | ||
| if (i == -1) i = 6 | ||
| return i | ||
| get() = Calendar.getInstance().get(Calendar.DAY_OF_WEEK) - 1 |
There was a problem hiding this comment.
Очень опасная хрень, потому что в Америке неделя начинается с воскресенья, и в Java это значение зависит от локали.
| fun getStartOfMonth(): Long { | ||
| val calendar = GregorianCalendar.getInstance() | ||
| val calendar = Calendar.getInstance() | ||
| calendar.set(Calendar.DAY_OF_MONTH, 0) |
There was a problem hiding this comment.
DAY_OF_MONTH по-моему начинается с 1
| fun getCurrentMillisecondsOfDay(): Long { | ||
| val calendar = Calendar.getInstance() | ||
| return ( | ||
| calendar.get(Calendar.HOUR_OF_DAY) * 60 * 60 * 1000 + | ||
| calendar.get(Calendar.MINUTE) * 60 * 1000 + | ||
| calendar.get(Calendar.SECOND) * 60 + | ||
| calendar.get(Calendar.MILLISECOND) | ||
| ).toLong() | ||
| } |
There was a problem hiding this comment.
Проще сделать now - getStartOfDay(now)
| return hours.toString() + | ||
| ":" + (if (minutes < 10) "0" else "") + minutes.toString() + | ||
| ":" + (if (seconds < 10) "0" else "") + seconds.toString() |
gradle.properties. Их можно будетуказать в
local.properties. ВSecrets.jsonпоявилось новое полеapiREADME.mdпоявилось краткое описание банки и инструкции по сборке сервера и приложениякоторые содержат только пробелы) (BON-191)
Вт, 02.12.2025 22:56:39) (BON-256)02 дек.->2 дек.)