-
Notifications
You must be signed in to change notification settings - Fork 3
docs, fixes & improvements #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Стрим надо надо закрыть. В котлине я делал так, в 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не совсем понимаю смысл делать кастомный ID приложения, если в дебаг сборке и так добавляется в конец .debug
| ApiResources.EMOJI_1, | ||
| ApiResources.EMOJI_2, | ||
| ApiResources.EMOJI_3, | ||
| ApiResources.EMOJI_4, | ||
| ApiResources.EMOJI_5, | ||
| ApiResources.EMOJI_6, | ||
| ApiResources.EMOJI_7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ApiResources. можно вырезать
|
|
||
| Android app | ||
| [](https://github.com/timas130/bonfire/actions) | ||
| [](https://discord.gg/QGcJrHknAp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Дискорд неофициальный, нафиг его
| * [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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Вообще 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() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment = 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Очень опасная хрень, потому что в Америке неделя начинается с воскресенья, и в 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Проще сделать now - getStartOfDay(now)
| return hours.toString() + | ||
| ":" + (if (minutes < 10) "0" else "") + minutes.toString() + | ||
| ":" + (if (seconds < 10) "0" else "") + seconds.toString() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
String.padStart()
gradle.properties. Их можно будетуказать в
local.properties. ВSecrets.jsonпоявилось новое полеapiREADME.mdпоявилось краткое описание банки и инструкции по сборке сервера и приложениякоторые содержат только пробелы) (BON-191)
Вт, 02.12.2025 22:56:39) (BON-256)02 дек.->2 дек.)