From 27fd2a22f4958c2800ffaaf6423a0a55d303b591 Mon Sep 17 00:00:00 2001 From: ivikashgorai Date: Fri, 25 Jul 2025 01:35:25 +0530 Subject: [PATCH] Chat implementation 1 --- .idea/compiler.xml | 2 +- .idea/deploymentTargetSelector.xml | 8 + .idea/gradle.xml | 2 +- .idea/inspectionProfiles/Project_Default.xml | 6 + .idea/misc.xml | 3 +- app/build.gradle.kts | 11 + app/src/main/AndroidManifest.xml | 2 + .../com/example/smarthr_app/MainActivity.kt | 50 +++- .../smarthr_app/data/model/ChatList.kt | 13 + .../smarthr_app/data/model/ChatMessage.kt | 13 + .../smarthr_app/data/model/SeenMessage.kt | 6 + .../smarthr_app/data/remote/ApiService.kt | 25 ++ .../data/remote/RetrofitInstance.kt | 2 +- .../data/repository/ChatRepository.kt | 99 +++++++ .../presentation/navigation/NavGraph.kt | 97 +++++-- .../presentation/screen/auth/LoginScreen.kt | 11 +- .../screen/auth/RegisterScreen.kt | 11 +- .../screen/chat/AllUserListScreen.kt | 121 +++++++++ .../screen/chat/ChatListScreen.kt | 207 ++++++++++++++ .../presentation/screen/chat/ChatScreen.kt | 254 ++++++++++++++++++ .../employee/EmployeeDashboardScreen.kt | 42 ++- .../screen/dashboard/hr/HRDashboardScreen.kt | 25 ++ .../presentation/viewmodel/ChatViewModel.kt | 221 +++++++++++++++ .../smarthr_app/utils/ChatStompClient.kt | 189 +++++++++++++ .../utils/createNotificationChannel.kt | 17 ++ .../smarthr_app/utils/showNotification.kt | 46 ++++ .../smarthr_app/utils/toReadableTime.kt | 18 ++ .../main/res/xml/network_security_config.xml | 6 + build.gradle.kts | 2 + gradle/libs.versions.toml | 14 +- settings.gradle.kts | 1 + 31 files changed, 1477 insertions(+), 47 deletions(-) create mode 100644 app/src/main/java/com/example/smarthr_app/data/model/ChatList.kt create mode 100644 app/src/main/java/com/example/smarthr_app/data/model/ChatMessage.kt create mode 100644 app/src/main/java/com/example/smarthr_app/data/model/SeenMessage.kt create mode 100644 app/src/main/java/com/example/smarthr_app/data/repository/ChatRepository.kt create mode 100644 app/src/main/java/com/example/smarthr_app/presentation/screen/chat/AllUserListScreen.kt create mode 100644 app/src/main/java/com/example/smarthr_app/presentation/screen/chat/ChatListScreen.kt create mode 100644 app/src/main/java/com/example/smarthr_app/presentation/screen/chat/ChatScreen.kt create mode 100644 app/src/main/java/com/example/smarthr_app/presentation/viewmodel/ChatViewModel.kt create mode 100644 app/src/main/java/com/example/smarthr_app/utils/ChatStompClient.kt create mode 100644 app/src/main/java/com/example/smarthr_app/utils/createNotificationChannel.kt create mode 100644 app/src/main/java/com/example/smarthr_app/utils/showNotification.kt create mode 100644 app/src/main/java/com/example/smarthr_app/utils/toReadableTime.kt create mode 100644 app/src/main/res/xml/network_security_config.xml diff --git a/.idea/compiler.xml b/.idea/compiler.xml index b589d56..b86273d 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/.idea/deploymentTargetSelector.xml b/.idea/deploymentTargetSelector.xml index b268ef3..89c2f2c 100644 --- a/.idea/deploymentTargetSelector.xml +++ b/.idea/deploymentTargetSelector.xml @@ -4,6 +4,14 @@ diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 0897082..639c779 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -4,6 +4,7 @@ diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index 6806f5a..0dfdca2 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -37,6 +37,9 @@