Skip to content

Commit

Permalink
tweak some log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
zoff99 committed Dec 20, 2023
1 parent 262d892 commit 3a7cf06
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/main/kotlin/com/zoffcc/applications/trifa/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1423,7 +1423,7 @@ class MainActivity
@JvmStatic
fun android_tox_callback_friend_connection_status_cb_method(friend_number: Long, a_TOX_CONNECTION: Int)
{
Log.i(TAG, "android_tox_callback_friend_connection_status_cb_method: fn=" + friend_number + " " + a_TOX_CONNECTION)
Log.i(TAG, "android_tox_callback_friend_connection_status_cb_method: friend number: " + friend_number + " " + a_TOX_CONNECTION)
update_savedata_file_wrapper()
try
{
Expand All @@ -1445,12 +1445,12 @@ class MainActivity
if (a_TOX_CONNECTION != TOX_CONNECTION.TOX_CONNECTION_NONE.value)
{
// ******** friend just came online ********
Log.i(TAG, "friend_connection_status_cb:friend just came online")
Log.i(TAG, "android_tox_callback_friend_connection_status_cb_method:friend just came online: friend number: " + friend_number)
// resend latest msgV3 message that was not "read"
try
{
val fpubkey = tox_friend_get_public_key(friend_number)
Log.i(TAG, "friend_connection_status_cb:friend just came online:" + fpubkey)
// Log.i(TAG, "friend_connection_status_cb:friend just came online:" + fpubkey)
if (get_friend_msgv3_capability(fpubkey) == 1L)
{
resend_v3_messages(fpubkey)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,6 @@ class TrifaToxService

fun resend_v3_messages(friend_pubkey: String?)
{
Log.i(TAG, "resend_v3_messages")
// loop through "old msg version" msgV3 1-on-1 text messages that have "resend_count < MAX_TEXTMSG_RESEND_COUNT_OLDMSG_VERSION" --------------
try
{
Expand All @@ -551,6 +550,7 @@ class TrifaToxService
}
if (m_v1 != null && m_v1.size > 0)
{
Log.i(TAG, "resend_v3_messages: we have " + m_v1.size + " messages to resend")
val ii = m_v1.iterator()
while (ii.hasNext())
{
Expand Down Expand Up @@ -584,7 +584,6 @@ class TrifaToxService

fun resend_old_messages(friend_pubkey: String?)
{
Log.i(TAG, "resend_old_messages")
try
{
var max_resend_count_per_iteration = 10
Expand All @@ -609,6 +608,7 @@ class TrifaToxService
}
if (m_v0 != null && m_v0.size > 0)
{
Log.i(TAG, "resend_old_messages: we have " + m_v0.size + " messages to resend")
val ii = m_v0.iterator()
while (ii.hasNext())
{
Expand Down Expand Up @@ -646,7 +646,6 @@ class TrifaToxService

fun resend_v2_messages(at_relay: Boolean)
{
Log.i(TAG, "resend_v2_messages")
// loop through all pending outgoing 1-on-1 text messages V2 (resend) --------------
try
{
Expand All @@ -670,13 +669,10 @@ class TrifaToxService
if (m_resend_v2.msg_id_hash == null ||
m_resend_v2.msg_id_hash.equals("", ignoreCase = true)) // resend msgV2 WITHOUT hash
{
Log.i(TAG, "resend_v2_messages:resend_msgV2_WITHOUT_hash:f=" +
m_resend_v2.tox_friendpubkey + " m=" + m_resend_v2)
val result: MainActivity.Companion.send_message_result? = tox_friend_send_message_wrapper(
m_resend_v2.tox_friendpubkey, 0, m_resend_v2.text, m_resend_v2.sent_timestamp / 1000)
if (result != null)
{
Log.i(TAG, "resend_v2_messages: resend result=" + result.msg_num)
val res: Long = result.msg_num
if (res > -1)
{
Expand Down

0 comments on commit 3a7cf06

Please sign in to comment.