Skip to content

Conversation

@Camper-CoolDie
Copy link
Contributor

  • Айпи серверов, название пакета и приложения перенесены в gradle.properties. Их можно будет
    указать в local.properties. В Secrets.json появилось новое поле api
  • В README.md появилось краткое описание банки и инструкции по сборке сервера и приложения
  • Убрано ограчинение на создание приветственных постов (BON-244)
  • Пустые комментарии под любыми мод. действиями теперь отклоняются сервером (в том числе те,
    которые содержат только пробелы) (BON-191)
    • Теперь в любых адм. действиях можно писать русские комментарии
  • Возвращён экран подписчиков фэндома (BON-107)
  • Исправлены аватарки пользователей в жалобах на публикацию (BON-255)
  • У отложенных постов в истории теперь показывается, до какого времени они отложены (BON-251)
  • При нажатии на дату публикации комментария или поста отобразится тост с полной датой (к примеру:
    Вт, 02.12.2025 22:56:39) (BON-256)
    • В датах число месяца теперь отображается без лишего нуля (02 дек. -> 2 дек.)

def localPropertiesFile = rootProject.file('local.properties')
def localProperties = new Properties()
if (localPropertiesFile.exists()) {
localProperties.load(localPropertiesFile.newDataInputStream())
Copy link
Owner

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) }
}

Comment on lines -16 to +31
applicationId "sh.sit.bonfire"
applicationId appId
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не совсем понимаю смысл делать кастомный ID приложения, если в дебаг сборке и так добавляется в конец .debug

Comment on lines +476 to +482
ApiResources.EMOJI_1,
ApiResources.EMOJI_2,
ApiResources.EMOJI_3,
ApiResources.EMOJI_4,
ApiResources.EMOJI_5,
ApiResources.EMOJI_6,
ApiResources.EMOJI_7
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ApiResources. можно вырезать


Android app
[![CI Status](https://github.com/timas130/bonfire/workflows/Continuous%20Integration/badge.svg)](https://github.com/timas130/bonfire/actions)
[![Discord](https://img.shields.io/discord/798617754118127636.svg?label=&logo=discord&logoColor=ffffff&color=5865f2)](https://discord.gg/QGcJrHknAp)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Дискорд неофициальный, нафиг его

Comment on lines +36 to +38
* [PostgreSQL database](https://postgresql.org/downloads) (the database should be named
"postgres")
* [MinIO server and client](https://min.io/open-source/download)
Copy link
Owner

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()
Copy link
Owner

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
Copy link
Owner

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)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DAY_OF_MONTH по-моему начинается с 1

Comment on lines +71 to 79
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()
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Проще сделать now - getStartOfDay(now)

Comment on lines +96 to +98
return hours.toString() +
":" + (if (minutes < 10) "0" else "") + minutes.toString() +
":" + (if (seconds < 10) "0" else "") + seconds.toString()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

String.padStart()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants