Skip to content
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

fixes #101

Merged
merged 2 commits into from
Jan 5, 2024
Merged

fixes #101

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/main/java/com/zoffcc/applications/trifa/HelperGroup.java
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,11 @@ public static class incoming_group_file_meta_data
String msg_id_hash;
}

static incoming_group_file_meta_data handle_incoming_group_file(String msg_id_hash_string, String sender_peer_name, String sender_peer_pubkey, boolean was_synced, long timestamp, long group_number, long sender_peer_num, byte[] data, long length, long header)
static incoming_group_file_meta_data handle_incoming_group_file(String msg_id_hash_string,
String sender_peer_name,
String sender_peer_pubkey, boolean was_synced,
long timestamp, long group_number, long sender_peer_num, byte[] data,
long length, long header)
{
incoming_group_file_meta_data ret = new incoming_group_file_meta_data();
ret.message_text = null;
Expand Down Expand Up @@ -1063,7 +1067,7 @@ private static void group_file_add_from_sync(final String group_identifier, fina
original_sender_peerpubkey,
true, timestamp, group_number,
sender_peer_num, file_byte_buf, file_byte_buf.length,
header_ngc_histsync_and_files);
0);

if (incoming_group_file_meta_data == null)
{
Expand Down
5 changes: 3 additions & 2 deletions src/main/kotlin/com/zoffcc/applications/trifa/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2785,7 +2785,8 @@ class MainActivity
val header_ngc_video_v1 = (6 + 1 + 1 + 1 + 1 + 1).toLong()
val header_ngc_video_v2 = (6 + 1 + 1 + 1 + 1 + 1 + 2 + 1).toLong()
val header_ngc_histsync_and_files = (6 + 1 + 1 + 32 + 32 + 4 + 25 + 255).toLong()
if (length <= TOX_MAX_NGC_FILE_AND_HEADER_SIZE && length >= header_ngc_histsync_and_files + 1)
val header_ngc_files = (6 + 1 + 1 + 32 + 4 + 255).toLong()
if (length <= TOX_MAX_NGC_FILE_AND_HEADER_SIZE && length >= header_ngc_files + 1)
{
// @formatter:off
/*
Expand Down Expand Up @@ -2819,7 +2820,7 @@ class MainActivity
tox_peer_name,
tox_peerpk,
false, msg_timestamp, group_number, peer_id, data,
length, header_ngc_histsync_and_files)
length, header_ngc_files)

if (incoming_group_file_meta_data != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ class TrifaToxService
}

update_audio_bar++
if (update_audio_bar == 2)
if (update_audio_bar >= 1)
{
update_audio_bar = 0
GlobalScope.launch {
Expand Down Expand Up @@ -570,7 +570,7 @@ class TrifaToxService
}

update_audio_bar++
if (update_audio_bar == 2)
if (update_audio_bar >= 1)
{
update_audio_bar = 0
GlobalScope.launch {
Expand Down
Loading