Skip to content

Commit

Permalink
Update for socket recycler and update new ec2 ip
Browse files Browse the repository at this point in the history
  • Loading branch information
RedEyesNCode committed Mar 13, 2024
1 parent d8bc861 commit ec37fb6
Show file tree
Hide file tree
Showing 29 changed files with 159 additions and 27 deletions.
Binary file added .gradle/8.0/checksums/checksums.lock
Binary file not shown.
Binary file not shown.
Empty file.
Binary file added .gradle/8.0/executionHistory/executionHistory.bin
Binary file not shown.
Binary file added .gradle/8.0/executionHistory/executionHistory.lock
Binary file not shown.
Binary file added .gradle/8.0/fileChanges/last-build.bin
Binary file not shown.
Binary file added .gradle/8.0/fileHashes/fileHashes.bin
Binary file not shown.
Binary file added .gradle/8.0/fileHashes/fileHashes.lock
Binary file not shown.
Binary file added .gradle/8.0/fileHashes/resourceHashesCache.bin
Binary file not shown.
Empty file added .gradle/8.0/gc.properties
Empty file.
Binary file added .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
2 changes: 2 additions & 0 deletions .gradle/buildOutputCleanup/cache.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Tue Mar 12 19:56:01 IST 2024
gradle.version=8.0
Binary file added .gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
2 changes: 2 additions & 0 deletions .gradle/config.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Tue Mar 12 19:55:45 IST 2024
java.home=/opt/android-studio-2023.1.1/android-studio/jbr
Empty file added .gradle/vcs-1/gc.properties
Empty file.
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/migrations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package com.redeyesncode.dateme.auth.chat
import android.os.Bundle
import android.util.Log
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.LinearLayoutManager
import com.google.android.gms.ads.AdRequest
import com.google.android.gms.ads.LoadAdError
Expand All @@ -25,10 +24,7 @@ import com.redeyesncode.dateme.network.response.UserLoginResponse
import com.redeyesncode.dateme.session.AppSession
import com.redeyesncode.dateme.session.Constant
import io.socket.client.IO
import io.socket.client.Manager
import io.socket.client.Socket
import io.socket.engineio.client.Transport
import io.socket.engineio.client.transports.WebSocket
import javax.inject.Inject


Expand Down Expand Up @@ -91,6 +87,8 @@ class GirlChatActivity : BaseActivity() {
layoutManager = LinearLayoutManager(this@GirlChatActivity,LinearLayoutManager.VERTICAL,false)
adapter = adapterChat
}
binding.rcvChat.post { binding.rcvChat.scrollToPosition(adapterChat.getItemCount() - 1) }

}else{
showSnackbar("No Chat History Available")
}
Expand Down Expand Up @@ -146,6 +144,8 @@ class GirlChatActivity : BaseActivity() {
messageMap.put("type","ANDROID")
messageMap.put("room",currentRoomName)
messageMap.put("senderId",user.data?.userId.toString())

// showCustomDialog("Info","senderId : ${user.data?.userId.toString()} Roomname : ${currentRoomName} clientId ${intent.getStringExtra("clientUserId").toString()}")
messageMap.put("receiverId",intent.getStringExtra("clientUserId").toString())

val userChatBody = UserChatBody("ANDROID",binding.messageInput.text.toString(),currentRoomName,
Expand All @@ -162,9 +162,15 @@ class GirlChatActivity : BaseActivity() {
binding.messageInput.text.clear()

messagesData.clear()
val chatHistoryMap = hashMapOf<String,String>()
chatHistoryMap.put("roomName",currentRoomName)
chatViewModel.getRoomChatMessages(chatHistoryMap)

showSnackbar("Loading New Messages !")

android.os.Handler().postDelayed(Runnable {
val chatHistoryMap = hashMapOf<String,String>()
chatHistoryMap.put("roomName",currentRoomName)
chatViewModel.getRoomChatMessages(chatHistoryMap)
},4000)

}else{
setupSocket()
Toast.makeText(this@GirlChatActivity,"SOCKET NOT CONNECTED",Toast.LENGTH_LONG).show()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ open class UserFeedFragment : BaseFragment() {
},
onSuccess = {
hideLoadingDialog()
googleAdSense()
// googleAdSense()

if(it.data.isNotEmpty()){
setupUserFeed(it.data)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,12 @@ class UserPageFragment : BaseFragment() {

binding.apply {
tvFullName.text = "${dataSet?.firstName} ${dataSet?.lastName}, "
tvAge.text = dataSet?.dateOfBirth.toString()
tvLocationName.text = dataSet?.lat_.toString()

tvAge.text = "Age ${dataSet?.age.toString()}"
tvNumber.text = "Number : ${dataSet?.number.toString()}"
tvEmailAddress.text = "Mail : ${dataSet?.email.toString()}"
tvDob.text = "Birthday : ${dataSet?.dateOfBirth.toString()}"
tvLocationName.text = "${dataSet?.lat_.toString()}, ${dataSet?.long_.toString()}"
tvUsername.text = "Username : ${dataSet?.userName.toString()}"
if(dataSet?.bio.toString().isEmpty()){
tvUserBio.text = "No Bio"
}else{
Expand Down
17 changes: 7 additions & 10 deletions app/src/main/res/layout/activity_girl_chat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,13 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rcvChat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="145dp"
android:scrollbars="vertical"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintBottom_toTopOf="@+id/input_layout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/adView"
tools:itemCount="5"
tools:listitem="@layout/incoming_message" />
android:layout_height="0dp"
android:scrollbars="vertical"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintTop_toBottomOf="@+id/adView"
app:layout_constraintBottom_toTopOf="@id/input_layout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />

<LinearLayout
android:id="@+id/input_layout"
Expand Down
64 changes: 58 additions & 6 deletions app/src/main/res/layout/fragment_user_page.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:fillViewport="true"

android:fadeScrollbars="false"
android:scrollbarSize="@dimen/_4sdp"
android:scrollIndicators="start"
android:scrollbarAlwaysDrawVerticalTrack="true"

app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/guideline"
android:background="@android:color/transparent">
Expand All @@ -52,29 +58,75 @@
<LinearLayout
android:layout_width="match_parent"
android:orientation="horizontal"
android:weightSum="2"
android:layout_height="wrap_content">
<TextView
android:id="@+id/tvFullName"
android:singleLine="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_weight="1"
android:fontFamily="@font/raleway_bold"
android:text="@string/name"
android:textColor="@color/black"
android:textSize="@dimen/_21sdp" />
<TextView
android:id="@+id/tvAge"
android:layout_weight="1"
</LinearLayout>
<TextView
android:id="@+id/tvAge"
android:layout_weight="1"

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:fontFamily="@font/raleway_bold"
android:text="@string/name"
android:textColor="@color/black"
android:textSize="@dimen/_21sdp" />

<LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="wrap_content">

<TextView
android:id="@+id/tvNumber"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/_4sdp"
android:visibility="invisible"
android:layout_centerInParent="true"
android:fontFamily="@font/raleway_bold"
android:fontFamily="@font/raleway_regular"
android:text="@string/name"
android:textColor="@color/black"
android:textSize="@dimen/_21sdp" />
android:textSize="@dimen/_15sdp" />
<TextView
android:id="@+id/tvUsername"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:fontFamily="@font/raleway_regular"
android:text="@string/name"
android:textColor="@color/black"
android:textSize="@dimen/_15sdp" />
<TextView
android:id="@+id/tvDob"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:fontFamily="@font/raleway_regular"
android:text="@string/name"
android:textColor="@color/black"
android:textSize="@dimen/_15sdp" />
<TextView
android:id="@+id/tvEmailAddress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:fontFamily="@font/raleway_regular"
android:text="@string/name"
android:textColor="@color/black"
android:textSize="@dimen/_15sdp" />

</LinearLayout>

<LinearLayout
Expand Down

0 comments on commit ec37fb6

Please sign in to comment.