Skip to content

Commit

Permalink
quick bugfix to stop crashes
Browse files Browse the repository at this point in the history
Signed-off-by: rapterjet2004 <[email protected]>
  • Loading branch information
rapterjet2004 committed Nov 24, 2023
1 parent 842dd03 commit 5847258
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class IncomingVoiceMessageViewHolder(incomingView: View, payload: Any) :
val retrieved = appPreferences!!.getWaveFormFromFile(filename)
if (retrieved.isNotEmpty() &&
message.voiceMessageFloatArray == null ||
message.voiceMessageFloatArray!!.isEmpty()
message.voiceMessageFloatArray?.isEmpty() == true
) {
message.voiceMessageFloatArray = retrieved.toFloatArray()
binding.seekbar.setWaveData(message.voiceMessageFloatArray!!)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class OutcomingVoiceMessageViewHolder(outcomingView: View) :
val retrieved = appPreferences!!.getWaveFormFromFile(filename)
if (retrieved.isNotEmpty() &&
message.voiceMessageFloatArray == null ||
message.voiceMessageFloatArray!!.isEmpty()
message.voiceMessageFloatArray?.isEmpty() == true
) {
Log.d("Julius", "Retrieved and set ${retrieved.contentToString()}")
message.voiceMessageFloatArray = retrieved.toFloatArray()
Expand Down

0 comments on commit 5847258

Please sign in to comment.