Skip to content

Conversation

@maklakovss
Copy link

No description provided.

Copy link
Owner

@batiaev batiaev left a comment

Choose a reason for hiding this comment

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

вечер добрый, по домашней работе все хорошо, но есть спорные моменты типа сдвига при загрузке данных

@Override
public String getMessages(int count, int offset) {
StringBuilder messages = new StringBuilder();
if (count > 0 && offset >= 0 && offset < messagesOffsets.size()) {
Copy link
Owner

Choose a reason for hiding this comment

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

не совсем ясно как удобно выделять сдвиг так как длина сообщений может быть различна

Copy link
Author

Choose a reason for hiding this comment

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

Добрый день!
При старте я зачитываю файл с историе и запоминаю все сдвиги для каждого сообщения. Потом при новых собщениях пополняю лист со сдвигами. Соответственно всегда могу зачитывать историю с нужного сообщения

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