mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-23 18:15:22 +00:00
parent
530b93c318
commit
893f106189
@ -27,7 +27,14 @@ public class SmsCharacterCalculator extends CharacterCalculator {
|
||||
int messagesSpent = length[0];
|
||||
int charactersSpent = length[1];
|
||||
int charactersRemaining = length[2];
|
||||
int maxMessageSize = (charactersSpent + charactersRemaining) / messagesSpent;
|
||||
|
||||
int maxMessageSize;
|
||||
|
||||
if (messagesSpent > 0) {
|
||||
maxMessageSize = (charactersSpent + charactersRemaining) / messagesSpent;
|
||||
} else {
|
||||
maxMessageSize = (charactersSpent + charactersRemaining);
|
||||
}
|
||||
|
||||
return new CharacterState(messagesSpent, charactersRemaining, maxMessageSize);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user