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

update dependencies and fix some warnings #144

Merged
merged 6 commits into from
Feb 9, 2024
Merged
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
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import org.gradle.initialization.Environment
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
import org.jetbrains.kotlin.de.undercouch.gradle.tasks.download.Download
import java.time.format.DateTimeFormatter
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ org.jetbrains.compose.experimental.uikit.enabled=true
android.defaults.buildfeatures.buildconfig=true
# Enable kotlin/native experimental memory model
kotlin.native.binary.memoryModel=experimental
compose.version=1.6.0-beta02
compose.version=1.5.12
kotlin.version=1.9.22
multiplatform.version=1.9.22
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionSha256Sum=3e1af3ae886920c3ac87f7a91f816c0c7c436f276a6eefdb3da152100fef72ae
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionSha256Sum=9631d53cf3e74bfa726893aee1f8994fee4e060c401335946dba2156f440f24c
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
74 changes: 37 additions & 37 deletions src/main/kotlin/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -203,17 +203,17 @@ val GROUPS_COLUMN_WIDTH = 200.dp
val GROUP_PEER_COLUMN_WIDTH = 180.dp
val MESAGE_INPUT_LINE_HEIGHT = 58.dp
val MAIN_TOP_TAB_HEIGHT = 160.dp
val IMAGE_PREVIEW_SIZE = 70f
val AVATAR_SIZE = 40f
val MAX_AVATAR_SIZE = 70f
const val IMAGE_PREVIEW_SIZE = 70f
const val AVATAR_SIZE = 40f
const val MAX_AVATAR_SIZE = 70f
val SPACE_AFTER_LAST_MESSAGE = 2.dp
val SPACE_BEFORE_FIRST_MESSAGE = 10.dp
val CAPTURE_VIDEO_FPS = 15
val CAPTURE_VIDEO_HIGH_FPS = 30
const val CAPTURE_VIDEO_FPS = 15
const val CAPTURE_VIDEO_HIGH_FPS = 30
val VIDEO_IN_BOX_WIDTH_SMALL = 80.dp
val VIDEO_IN_BOX_HEIGHT_SMALL = 80.dp
val VIDEO_IN_BOX_WIDTH_FRACTION_SMALL = 0.3f
val VIDEO_IN_BOX_WIDTH_FRACTION_BIG = 0.9f
const val VIDEO_IN_BOX_WIDTH_FRACTION_SMALL = 0.3f
const val VIDEO_IN_BOX_WIDTH_FRACTION_BIG = 0.9f
val VIDEO_IN_BOX_WIDTH_BIG = 800.dp
val VIDEO_IN_BOX_HEIGHT_BIG = 3000.dp
val VIDEO_OUT_BOX_WIDTH_SMALL = 130.dp
Expand All @@ -234,7 +234,7 @@ const val SNACKBAR_TOAST_MS_DURATION: Long = 1000
var emojis_cat_all_gropued: ArrayList<ArrayList<ArrayList<EmojiStrAndName>>> = ArrayList()
var emojis_cat_all_cat_names: ArrayList<String> = ArrayList()
var emojis_cat_all_cat_emoji: ArrayList<String> = ArrayList()
val emojis_per_row = 6
const val emojis_per_row = 6
val ImageloaderDispatcher = Executors.newFixedThreadPool(5).asCoroutineDispatcher()
var global_semaphore_contactlist_ui = CustomSemaphore(1)
var global_semaphore_grouppeerlist_ui = CustomSemaphore(1)
Expand Down Expand Up @@ -311,15 +311,15 @@ fun App()
start_button_text = tox_running_state
tox_running_state_wrapper = tox_running_state
start_button_text_wrapper = start_button_text
Log.i(TAG, "----> tox_running_state = $tox_running_state_wrapper");
Log.i(TAG, "----> tox_running_state = $tox_running_state_wrapper")
Thread {
Log.i(TAG, "waiting to stop ...");
Log.i(TAG, "waiting to stop ...")
while (tox_running_state_wrapper != "stopped")
{
Thread.sleep(100)
Log.i(TAG, "waiting ...");
Log.i(TAG, "waiting ...")
}
Log.i(TAG, "is stopped now");
Log.i(TAG, "is stopped now")
tox_running_state = tox_running_state_wrapper
start_button_text = "start"
}.start()
Expand All @@ -331,15 +331,15 @@ fun App()
start_button_text = tox_running_state
tox_running_state_wrapper = tox_running_state
start_button_text_wrapper = start_button_text
Log.i(TAG, "----> tox_running_state = $tox_running_state_wrapper");
Log.i(TAG, "----> tox_running_state = $tox_running_state_wrapper")
Thread {
Log.i(TAG, "waiting to startup ...");
Log.i(TAG, "waiting to startup ...")
while (tox_running_state_wrapper != "running")
{
Thread.sleep(100)
Log.i(TAG, "waiting ...");
Log.i(TAG, "waiting ...")
}
Log.i(TAG, "is started now");
Log.i(TAG, "is started now")
tox_running_state = tox_running_state_wrapper
start_button_text = "stop"
}.start()
Expand Down Expand Up @@ -679,7 +679,7 @@ fun App()
var expanded_vs by remember { mutableStateOf(false) }
val audio_in_devices by remember { mutableStateOf(ArrayList<String>()) }
val audio_in_sources by remember { mutableStateOf(ArrayList<AVActivity.ffmpegav_descrid>()) }
var video_in_devices by remember { mutableStateOf(ArrayList<String>()) }
val video_in_devices by remember { mutableStateOf(ArrayList<String>()) }
val video_in_sources by remember { mutableStateOf(ArrayList<AVActivity.ffmpegav_descrid>()) }
Column(modifier = Modifier.padding(5.dp).randomDebugBorder()) {
Text(text = "audio capture: " + avstatestore.state.audio_in_device_get() + " " + avstatestore.state.audio_in_source_get()
Expand Down Expand Up @@ -737,7 +737,7 @@ fun App()
{
val tmp0 = AVActivity.ffmpegav_descrid()
tmp0.id = "default"
var tmp2 = ArrayList<AVActivity.ffmpegav_descrid>()
val tmp2 = ArrayList<AVActivity.ffmpegav_descrid>()
tmp2.add(tmp0)
audio_in_sources_get = tmp2.toTypedArray()
}
Expand All @@ -748,7 +748,7 @@ fun App()
}
else if (avstatestore.state.audio_in_device_get() == JAVA_AUDIO_IN_DEVICE_NAME)
{
var tmp2 = ArrayList<AVActivity.ffmpegav_descrid>()
val tmp2 = ArrayList<AVActivity.ffmpegav_descrid>()
tmp.iterator().forEach() {
if ((it != null) && (it.id != null))
{
Expand All @@ -762,7 +762,7 @@ fun App()
}
else
{
var tmp2 = ArrayList<AVActivity.ffmpegav_descrid>()
val tmp2 = ArrayList<AVActivity.ffmpegav_descrid>()
tmp.iterator().forEach() {
if ((it != null) && (it.id != null))
{
Expand Down Expand Up @@ -870,7 +870,7 @@ fun App()
}
else
{
var tmp2 = ArrayList<AVActivity.ffmpegav_descrid>()
val tmp2 = ArrayList<AVActivity.ffmpegav_descrid>()
tmp.iterator().forEach() {
if ((it != null) && (it.id != null))
{
Expand All @@ -889,7 +889,7 @@ fun App()
}
else
{
var tmp2 = ArrayList<AVActivity.ffmpegav_descrid>()
val tmp2 = ArrayList<AVActivity.ffmpegav_descrid>()
tmp.iterator().forEach() {
if ((it != null) && (it.id != null))
{
Expand Down Expand Up @@ -991,7 +991,7 @@ fun App()
modifier = Modifier.size(200.dp, 5.dp),
factory = {
JPanel(SingleComponentAspectRatioKeeperLayout(), true).apply {
add(AudioBar.audio_out_bar)
add(audio_out_bar)
AudioBar.set_bar_bgcolor(audio_bar_bgcolor.toArgb(), audio_out_bar)
}
},
Expand All @@ -1002,7 +1002,7 @@ fun App()
modifier = Modifier.size(200.dp, 5.dp),
factory = {
JPanel(SingleComponentAspectRatioKeeperLayout(), true).apply {
add(AudioBar.audio_in_bar)
add(audio_in_bar)
AudioBar.set_bar_bgcolor(audio_bar_bgcolor.toArgb(), audio_in_bar)
}
},
Expand Down Expand Up @@ -1248,7 +1248,7 @@ fun load_groupmessages_for_friend(selectedGroupId: String?)
}
// Thread.sleep(4000)
groupmessagestore.send(GroupMessageAction.ReceiveMessagesBulkWithClear(uigroupmessages, groupid))
} catch (e: Exception)
} catch (_: Exception)
{
}
}
Expand Down Expand Up @@ -1346,7 +1346,7 @@ fun set_tox_running_state(new_state: String)
{
tox_running_state_wrapper = new_state
start_button_text_wrapper = tox_running_state_wrapper
Log.i(TAG, "----> tox_running_state = $tox_running_state_wrapper");
Log.i(TAG, "----> tox_running_state = $tox_running_state_wrapper")
if (tox_running_state_wrapper == "stopped")
{
online_button_color_wrapper = Color.White.toArgb()
Expand Down Expand Up @@ -1374,7 +1374,7 @@ fun set_tox_online_state(new_state: String)
{
online_button_color_wrapper = Color.Red.toArgb()
}
Log.i(TAG, "----> tox_online_state = $online_button_text_wrapper");
Log.i(TAG, "----> tox_online_state = $online_button_text_wrapper")
}

fun main() = application(exitProcessOnExit = true) {
Expand Down Expand Up @@ -1405,7 +1405,7 @@ fun main() = application(exitProcessOnExit = true) {

try {
set_resouces_dir(RESOURCESDIR.canonicalPath)
} catch(e: Exception) {}
} catch(_: Exception) {}

try
{
Expand All @@ -1416,11 +1416,11 @@ fun main() = application(exitProcessOnExit = true) {
var remain: Int
// ------
// --- loop ---
for(j in 0..(IosEmojiProvider().categories.size - 1))
for(j1 in 0..(IosEmojiProvider().categories.size - 1))
{
Log.i(TAG, "adding emoji category: " + j + " : " + IosEmojiProvider().categories[j].categoryNames.values.elementAt(0))
Log.i(TAG, "adding emoji category: " + j1 + " : " + IosEmojiProvider().categories[j1].categoryNames.values.elementAt(0))
val emojis_cat_gropued: ArrayList<ArrayList<EmojiStrAndName>> = ArrayList()
emojis_cat_ = IosEmojiProvider().categories[j].emojis
emojis_cat_ = IosEmojiProvider().categories[j1].emojis
grouped_entries = emojis_cat_.size / emojis_per_row
remain = emojis_cat_.size - (grouped_entries * emojis_per_row)
for (i in 0..(grouped_entries - 1))
Expand All @@ -1436,7 +1436,7 @@ fun main() = application(exitProcessOnExit = true) {
em.name = ""
try
{
em.name = emojis_cat_[pos + j].shortcodes.get(0)
em.name = emojis_cat_[pos + j].shortcodes[0]
}
catch(_: java.lang.Exception)
{
Expand Down Expand Up @@ -1466,7 +1466,7 @@ fun main() = application(exitProcessOnExit = true) {
emojis_cat_gropued.add(e)
}
emojis_cat_all_gropued.add(emojis_cat_gropued)
val cat_name = IosEmojiProvider().categories[j].categoryNames.values.elementAt(0)
val cat_name = IosEmojiProvider().categories[j1].categoryNames.values.elementAt(0)
emojis_cat_all_cat_names.add(cat_name)
var cat_emoji: String
try
Expand Down Expand Up @@ -1808,19 +1808,19 @@ private fun MainAppStart()
set_tox_running_state("stopping ...")
TrifaToxService.stop_me = true
runBlocking(Dispatchers.Default) {
Log.i(TAG, "waiting to shutdown ...");
Log.i(TAG, "waiting to shutdown ...")
while (tox_running_state_wrapper != "stopped")
{
delay(100)
Log.i(TAG, "waiting ...");
Log.i(TAG, "waiting ...")
}
Log.i(TAG, "closing application");
Log.i(TAG, "closing application")
closing_application = true
isOpen = false
}
} else
{
Log.i(TAG, "closing application");
Log.i(TAG, "closing application")
isOpen = false
closing_application = true
}
Expand Down
Loading
Loading