Compare commits

..

No commits in common. "772005910c2ac67bc9a6d49a3f6707d9963ccd82" and "81faf3f7ee07d3d169c945f5eb45700e7578fcfa" have entirely different histories.

211 changed files with 327 additions and 2855 deletions

View File

@ -1,123 +0,0 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<JetCodeStyleSettings>
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</JetCodeStyleSettings>
<codeStyleSettings language="XML">
<option name="FORCE_REARRANGE_MODE" value="1" />
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
<arrangement>
<rules>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:android</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:id</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>style</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
<order>ANDROID_ATTRIBUTE_ORDER</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>.*</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
</rules>
</arrangement>
</codeStyleSettings>
<codeStyleSettings language="kotlin">
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</codeStyleSettings>
</code_scheme>
</component>

View File

@ -1,5 +0,0 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</state>
</component>

View File

@ -4,14 +4,6 @@
<selectionStates>
<SelectionState runConfigName="app">
<option name="selectionMode" value="DROPDOWN" />
<DropdownSelection timestamp="2024-08-26T10:43:24.248064Z">
<Target type="DEFAULT_BOOT">
<handle>
<DeviceId pluginId="LocalEmulator" identifier="path=/Users/klaus/.android/avd/Pixel_8_Pro_API_34.avd" />
</handle>
</Target>
</DropdownSelection>
<DialogSelection />
</SelectionState>
</selectionStates>
</component>

View File

@ -1,318 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="direct_access_persist.xml">
<option name="deviceSelectionList">
<list>
<PersistentDeviceSelectionData>
<option name="api" value="27" />
<option name="brand" value="DOCOMO" />
<option name="codename" value="F01L" />
<option name="id" value="F01L" />
<option name="manufacturer" value="FUJITSU" />
<option name="name" value="F-01L" />
<option name="screenDensity" value="360" />
<option name="screenX" value="720" />
<option name="screenY" value="1280" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="28" />
<option name="brand" value="DOCOMO" />
<option name="codename" value="SH-01L" />
<option name="id" value="SH-01L" />
<option name="manufacturer" value="SHARP" />
<option name="name" value="AQUOS sense2 SH-01L" />
<option name="screenDensity" value="480" />
<option name="screenX" value="1080" />
<option name="screenY" value="2160" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="31" />
<option name="brand" value="samsung" />
<option name="codename" value="a51" />
<option name="id" value="a51" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy A51" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="akita" />
<option name="id" value="akita" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 8a" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="samsung" />
<option name="codename" value="b0q" />
<option name="id" value="b0q" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy S22 Ultra" />
<option name="screenDensity" value="600" />
<option name="screenX" value="1440" />
<option name="screenY" value="3088" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="32" />
<option name="brand" value="google" />
<option name="codename" value="bluejay" />
<option name="id" value="bluejay" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 6a" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="caiman" />
<option name="id" value="caiman" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 9 Pro" />
<option name="screenDensity" value="360" />
<option name="screenX" value="960" />
<option name="screenY" value="2142" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="comet" />
<option name="id" value="comet" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 9 Pro Fold" />
<option name="screenDensity" value="390" />
<option name="screenX" value="2076" />
<option name="screenY" value="2152" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="29" />
<option name="brand" value="samsung" />
<option name="codename" value="crownqlteue" />
<option name="id" value="crownqlteue" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy Note9" />
<option name="screenDensity" value="420" />
<option name="screenX" value="2220" />
<option name="screenY" value="1080" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="dm3q" />
<option name="id" value="dm3q" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy S23 Ultra" />
<option name="screenDensity" value="600" />
<option name="screenX" value="1440" />
<option name="screenY" value="3088" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="e1q" />
<option name="id" value="e1q" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy S24" />
<option name="screenDensity" value="480" />
<option name="screenX" value="1080" />
<option name="screenY" value="2340" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="google" />
<option name="codename" value="felix" />
<option name="id" value="felix" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel Fold" />
<option name="screenDensity" value="420" />
<option name="screenX" value="2208" />
<option name="screenY" value="1840" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="felix" />
<option name="id" value="felix" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel Fold" />
<option name="screenDensity" value="420" />
<option name="screenX" value="2208" />
<option name="screenY" value="1840" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="google" />
<option name="codename" value="felix_camera" />
<option name="id" value="felix_camera" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel Fold (Camera-enabled)" />
<option name="screenDensity" value="420" />
<option name="screenX" value="2208" />
<option name="screenY" value="1840" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="samsung" />
<option name="codename" value="gts8uwifi" />
<option name="id" value="gts8uwifi" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy Tab S8 Ultra" />
<option name="screenDensity" value="320" />
<option name="screenX" value="1848" />
<option name="screenY" value="2960" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="husky" />
<option name="id" value="husky" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 8 Pro" />
<option name="screenDensity" value="390" />
<option name="screenX" value="1008" />
<option name="screenY" value="2244" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="30" />
<option name="brand" value="motorola" />
<option name="codename" value="java" />
<option name="id" value="java" />
<option name="manufacturer" value="Motorola" />
<option name="name" value="G20" />
<option name="screenDensity" value="280" />
<option name="screenX" value="720" />
<option name="screenY" value="1600" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="komodo" />
<option name="id" value="komodo" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 9 Pro XL" />
<option name="screenDensity" value="360" />
<option name="screenX" value="1008" />
<option name="screenY" value="2244" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="google" />
<option name="codename" value="lynx" />
<option name="id" value="lynx" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 7a" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="31" />
<option name="brand" value="google" />
<option name="codename" value="oriole" />
<option name="id" value="oriole" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 6" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="google" />
<option name="codename" value="panther" />
<option name="id" value="panther" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 7" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="q5q" />
<option name="id" value="q5q" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy Z Fold5" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1812" />
<option name="screenY" value="2176" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="30" />
<option name="brand" value="google" />
<option name="codename" value="r11" />
<option name="id" value="r11" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel Watch" />
<option name="screenDensity" value="320" />
<option name="screenX" value="384" />
<option name="screenY" value="384" />
<option name="type" value="WEAR_OS" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="30" />
<option name="brand" value="google" />
<option name="codename" value="redfin" />
<option name="id" value="redfin" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 5" />
<option name="screenDensity" value="440" />
<option name="screenX" value="1080" />
<option name="screenY" value="2340" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="shiba" />
<option name="id" value="shiba" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 8" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="google" />
<option name="codename" value="tangorpro" />
<option name="id" value="tangorpro" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel Tablet" />
<option name="screenDensity" value="320" />
<option name="screenX" value="1600" />
<option name="screenY" value="2560" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="tokay" />
<option name="id" value="tokay" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 9" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2424" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="29" />
<option name="brand" value="samsung" />
<option name="codename" value="x1q" />
<option name="id" value="x1q" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy S20" />
<option name="screenDensity" value="480" />
<option name="screenX" value="1440" />
<option name="screenY" value="3200" />
</PersistentDeviceSelectionData>
</list>
</option>
</component>
</project>

View File

@ -14,7 +14,7 @@ plugins {
android {
namespace 'kr.co.vividnext.sodalive'
compileSdk 34
compileSdk 33
viewBinding {
enabled true
@ -24,6 +24,11 @@ android {
dataBinding true
}
lintOptions {
checkDependencies true
checkReleaseBuilds false
}
dependenciesInfo {
// Disables dependency metadata when building APKs.
includeInApk = false
@ -34,9 +39,9 @@ android {
defaultConfig {
applicationId "kr.co.vividnext.sodalive"
minSdk 23
targetSdk 34
versionCode 104
versionName "1.17.0"
targetSdk 33
versionCode 92
versionName "1.14.1"
}
buildTypes {
@ -52,8 +57,7 @@ android {
}
debug {
minifyEnabled true
debuggable true
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
applicationIdSuffix '.debug'
@ -71,10 +75,6 @@ android {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}
lint {
checkDependencies true
checkReleaseBuilds false
}
}
dependencies {
@ -137,7 +137,7 @@ dependencies {
implementation 'com.google.firebase:firebase-config-ktx'
// bootpay
implementation "io.github.bootpay:android:4.4.3"
implementation "io.github.bootpay:android:4.3.4"
// agora
implementation "io.agora.rtc:voice-sdk:4.2.6"

View File

@ -222,10 +222,9 @@
-keep class kr.co.bootpay.core.** { *; }
-keep class retrofit2.** { *; }
-keep class com.google.gson.** { *; }
-keep class sun.misc.** { *; }
# @Keep 애노테이션이 붙은 클래스, 메서드, 필드를 보호
-keep @androidx.annotation.Keep class * { *; }
-keep class kr.co.pointclick.sdk.offerwall.core.consts.** {*;}
-keep interface kr.co.pointclick.sdk.offerwall.core.consts.** {*;}
-keep class kr.co.pointclick.sdk.offerwall.core.models.** {*;}
-keep interface kr.co.pointclick.sdk.offerwall.core.models.** {*;}
-keep class kr.co.pointclick.sdk.offerwall.core.PointClickAd {*;}
-keep class kr.co.pointclick.sdk.offerwall.core.events.PackageReceiver {*;}

View File

@ -4,8 +4,6 @@
<uses-permission android:name="com.android.vending.BILLING" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission
@ -150,7 +148,6 @@
<activity android:name=".mypage.alarm.AlarmListActivity" />
<activity android:name=".mypage.alarm.AddAlarmActivity" />
<activity android:name=".mypage.alarm.select_audio_content.AlarmSelectAudioContentActivity" />
<activity android:name=".mypage.block.BlockMemberActivity" />
<activity
android:name=".mypage.alarm.AlarmActivity"
android:exported="true"

View File

@ -172,14 +172,13 @@ class Agora(
fun sendRawMessageToPeer(
receiverUid: String,
requestType: LiveRoomRequestType? = null,
rawMessage: ByteArray? = null,
requestType: LiveRoomRequestType,
onSuccess: () -> Unit
) {
val option = SendMessageOptions()
val message = rtmClient!!.createMessage()
message.rawMessage = rawMessage ?: requestType.toString().toByteArray()
message.rawMessage = requestType.toString().toByteArray()
rtmClient!!.sendMessageToPeer(
receiverUid,

View File

@ -1,16 +1,13 @@
package kr.co.vividnext.sodalive.audio_content
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
import java.util.TimeZone
@Keep
data class AddAllPlaybackTrackingRequest(
@SerializedName("timezone") val timezone: String = TimeZone.getDefault().id,
@SerializedName("trackingDataList") val trackingDataList: List<PlaybackTrackingData>
)
@Keep
data class PlaybackTrackingData(
@SerializedName("contentId") val contentId: Long,
@SerializedName("playDateTime") val playDateTime: String,

View File

@ -6,10 +6,10 @@ import android.app.PendingIntent
import android.app.Service
import android.content.Context
import android.content.Intent
import android.content.pm.ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK
import android.graphics.Bitmap
import android.graphics.drawable.Drawable
import android.media.AudioAttributes
import android.media.AudioManager
import android.media.MediaPlayer
import android.os.Build
import android.os.Handler
@ -52,7 +52,6 @@ class AudioContentPlayService :
putExtra(Constants.EXTRA_AUDIO_CONTENT_PROGRESS, mediaPlayer.currentPosition)
putExtra(Constants.EXTRA_AUDIO_CONTENT_ID, contentId)
}
intent.setPackage(packageName)
sendBroadcast(intent)
handler.postDelayed(this, 1000)
}
@ -66,7 +65,6 @@ class AudioContentPlayService :
sendBroadcast(
Intent(Constants.ACTION_AUDIO_CONTENT_RECEIVER)
.apply {
setPackage(packageName)
putExtra(
Constants.EXTRA_AUDIO_CONTENT_CHANGE_UI,
true
@ -104,7 +102,6 @@ class AudioContentPlayService :
sendBroadcast(
Intent(Constants.ACTION_MAIN_AUDIO_CONTENT_RECEIVER)
.apply {
setPackage(packageName)
putExtra(
Constants.EXTRA_AUDIO_CONTENT_SHOWING,
true
@ -140,7 +137,6 @@ class AudioContentPlayService :
sendBroadcast(
Intent(Constants.ACTION_MAIN_AUDIO_CONTENT_RECEIVER)
.apply {
setPackage(packageName)
putExtra(
Constants.EXTRA_AUDIO_CONTENT_SHOWING,
false
@ -210,7 +206,6 @@ class AudioContentPlayService :
sendBroadcast(
Intent(Constants.ACTION_AUDIO_CONTENT_RECEIVER)
.apply {
setPackage(packageName)
putExtra(
Constants.EXTRA_AUDIO_CONTENT_NEXT_ACTION,
MusicAction.PAUSE
@ -226,7 +221,6 @@ class AudioContentPlayService :
sendBroadcast(
Intent(Constants.ACTION_AUDIO_CONTENT_RECEIVER)
.apply {
setPackage(packageName)
putExtra(
Constants.EXTRA_AUDIO_CONTENT_NEXT_ACTION,
MusicAction.PLAY
@ -261,7 +255,6 @@ class AudioContentPlayService :
sendBroadcast(
Intent(Constants.ACTION_AUDIO_CONTENT_RECEIVER)
.apply {
setPackage(packageName)
putExtra(
Constants.EXTRA_AUDIO_CONTENT_LOADING,
true
@ -325,7 +318,6 @@ class AudioContentPlayService :
sendBroadcast(
Intent(Constants.ACTION_AUDIO_CONTENT_RECEIVER)
.apply {
setPackage(packageName)
putExtra(
Constants.EXTRA_AUDIO_CONTENT_CHANGE_UI,
true
@ -350,7 +342,6 @@ class AudioContentPlayService :
sendBroadcast(
Intent(Constants.ACTION_MAIN_AUDIO_CONTENT_RECEIVER)
.apply {
setPackage(packageName)
putExtra(
Constants.EXTRA_AUDIO_CONTENT_PLAYING,
this@AudioContentPlayService.isPlaying
@ -389,7 +380,6 @@ class AudioContentPlayService :
sendBroadcast(
Intent(Constants.ACTION_AUDIO_CONTENT_RECEIVER)
.apply {
setPackage(packageName)
putExtra(
Constants.EXTRA_AUDIO_CONTENT_NEXT_ACTION,
MusicAction.PLAY
@ -415,7 +405,6 @@ class AudioContentPlayService :
sendBroadcast(
Intent(Constants.ACTION_MAIN_AUDIO_CONTENT_RECEIVER)
.apply {
setPackage(packageName)
putExtra(
Constants.EXTRA_AUDIO_CONTENT_PLAYING,
false
@ -511,16 +500,7 @@ class AudioContentPlayService :
.setShowActionsInCompactView(0, 1)
)
val notification = notificationBuilder.build()
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
startForeground(
1,
notification,
FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK
)
} else {
startForeground(1, notification)
}
startForeground(1, notificationBuilder.build())
}
override fun onLoadCleared(placeholder: Drawable?) {

View File

@ -1,6 +1,5 @@
package kr.co.vividnext.sodalive.audio_content
import androidx.annotation.Keep
import io.objectbox.annotation.Entity
import io.objectbox.annotation.Id
import java.text.SimpleDateFormat
@ -8,7 +7,6 @@ import java.util.Date
import java.util.Locale
@Entity
@Keep
data class PlaybackTracking(
@Id
var id: Long = 0,

View File

@ -1,10 +1,8 @@
package kr.co.vividnext.sodalive.audio_content.all
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
import kr.co.vividnext.sodalive.audio_content.main.GetAudioContentMainItem
@Keep
data class GetNewContentAllResponse(
@SerializedName("totalCount") val totalCount: Int,
@SerializedName("items") val items: List<GetAudioContentMainItem>

View File

@ -1,10 +1,8 @@
package kr.co.vividnext.sodalive.audio_content.all.by_theme
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
import kr.co.vividnext.sodalive.audio_content.main.GetAudioContentMainItem
@Keep
data class GetContentByThemeResponse(
@SerializedName("theme") val theme: String,
@SerializedName("totalCount") val totalCount: Int,

View File

@ -1,9 +1,7 @@
package kr.co.vividnext.sodalive.audio_content.category
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class GetCategoryListResponse(
@SerializedName("categoryId") val categoryId: Long,
@SerializedName("category") val category: String

View File

@ -9,7 +9,6 @@ import androidx.appcompat.widget.PopupMenu
import androidx.recyclerview.widget.RecyclerView
import coil.load
import coil.transform.CircleCropTransformation
import com.orhanobut.logger.Logger
import kr.co.vividnext.sodalive.R
import kr.co.vividnext.sodalive.common.SharedPreferenceManager
import kr.co.vividnext.sodalive.databinding.ItemAudioContentCommentBinding
@ -20,8 +19,7 @@ class AudioContentCommentAdapter(
private val creatorId: Long,
private val modifyComment: (Long, String) -> Unit,
private val onClickDelete: (Long) -> Unit,
private val onItemClick: (GetAudioContentCommentListItem) -> Unit,
private val onClickProfile: (Long) -> Unit
private val onItemClick: (GetAudioContentCommentListItem) -> Unit
) : RecyclerView.Adapter<AudioContentCommentAdapter.ViewHolder>() {
var items = mutableSetOf<GetAudioContentCommentListItem>()
@ -32,24 +30,12 @@ class AudioContentCommentAdapter(
) : RecyclerView.ViewHolder(binding.root) {
fun bind(item: GetAudioContentCommentListItem) {
binding.tvSecret.visibility = if (item.isSecret) {
View.VISIBLE
} else {
View.GONE
}
binding.ivCommentProfile.load(item.profileUrl) {
crossfade(true)
placeholder(R.drawable.bg_placeholder)
transformations(CircleCropTransformation())
}
binding.ivCommentProfile.setOnClickListener {
if (SharedPreferenceManager.userId != item.writerId) {
onClickProfile(item.writerId)
}
}
val tvCommentLayoutParams = binding.tvComment.layoutParams as LinearLayout.LayoutParams
val can = item.donationCan
if (can > 0) {

View File

@ -14,8 +14,7 @@ import kr.co.vividnext.sodalive.databinding.DialogAudioContentCommentBinding
class AudioContentCommentFragment(
private val creatorId: Long,
private val audioContentId: Long,
private val isShowSecret: Boolean
private val audioContentId: Long
) : BottomSheetDialogFragment() {
private lateinit var binding: DialogAudioContentCommentBinding
@ -51,8 +50,7 @@ class AudioContentCommentFragment(
val commentListFragmentTag = "COMMENT_LIST_FRAGMENT"
val commentListFragment = AudioContentCommentListFragment.newInstance(
creatorId = creatorId,
audioContentId = audioContentId,
isShowSecret = isShowSecret
audioContentId = audioContentId
)
val fragmentTransaction = childFragmentManager.beginTransaction()
fragmentTransaction.add(R.id.fl_container, commentListFragment, commentListFragmentTag)

View File

@ -20,7 +20,6 @@ import kr.co.vividnext.sodalive.common.Constants
import kr.co.vividnext.sodalive.common.LoadingDialog
import kr.co.vividnext.sodalive.common.SharedPreferenceManager
import kr.co.vividnext.sodalive.databinding.FragmentAudioContentCommentListBinding
import kr.co.vividnext.sodalive.dialog.MemberProfileDialog
import kr.co.vividnext.sodalive.extensions.dpToPx
import org.koin.android.ext.android.inject
@ -36,7 +35,6 @@ class AudioContentCommentListFragment : BaseFragment<FragmentAudioContentComment
private var creatorId: Long = 0
private var audioContentId: Long = 0
private var isShowSecret: Boolean = false
override fun onCreateView(
inflater: LayoutInflater,
@ -45,7 +43,6 @@ class AudioContentCommentListFragment : BaseFragment<FragmentAudioContentComment
): View? {
creatorId = arguments?.getLong(Constants.EXTRA_AUDIO_CONTENT_CREATOR_ID) ?: 0
audioContentId = arguments?.getLong(Constants.EXTRA_AUDIO_CONTENT_ID) ?: 0
isShowSecret = arguments?.getBoolean(Constants.EXTRA_IS_SHOW_SECRET) ?: false
return super.onCreateView(inflater, container, savedInstanceState)
}
@ -76,20 +73,8 @@ class AudioContentCommentListFragment : BaseFragment<FragmentAudioContentComment
binding.ivCommentSend.setOnClickListener {
hideKeyboard()
val comment = binding.etComment.text.toString()
val isSecret = binding.tvSecret.isSelected
viewModel.registerComment(audioContentId, comment, isSecret)
binding.etComment.setText("")
binding.tvSecret.isSelected = false
}
if (isShowSecret) {
binding.tvSecret.visibility = View.VISIBLE
binding.tvSecret.setOnClickListener {
binding.tvSecret.isSelected = !binding.tvSecret.isSelected
}
} else {
binding.tvSecret.visibility = View.GONE
viewModel.registerComment(audioContentId, comment)
}
adapter = AudioContentCommentAdapter(
@ -122,14 +107,6 @@ class AudioContentCommentListFragment : BaseFragment<FragmentAudioContentComment
},
onItemClick = {
(parentFragment as AudioContentCommentFragment).onClickComment(it)
},
onClickProfile = {
MemberProfileDialog(
activity = requireActivity(),
layoutInflater = layoutInflater,
memberId = it,
screenWidth = screenWidth
).show()
}
)
@ -225,15 +202,10 @@ class AudioContentCommentListFragment : BaseFragment<FragmentAudioContentComment
}
companion object {
fun newInstance(
creatorId: Long,
audioContentId: Long,
isShowSecret: Boolean
): AudioContentCommentListFragment {
fun newInstance(creatorId: Long, audioContentId: Long): AudioContentCommentListFragment {
val args = Bundle()
args.putLong(Constants.EXTRA_AUDIO_CONTENT_CREATOR_ID, creatorId)
args.putLong(Constants.EXTRA_AUDIO_CONTENT_ID, audioContentId)
args.putBoolean(Constants.EXTRA_IS_SHOW_SECRET, isShowSecret)
val fragment = AudioContentCommentListFragment()
fragment.arguments = args

View File

@ -84,7 +84,7 @@ class AudioContentCommentListViewModel(
}
}
fun registerComment(contentId: Long, comment: String, isSecret: Boolean) {
fun registerComment(contentId: Long, comment: String) {
if (!_isLoading.value!!) {
_isLoading.value = true
}
@ -93,7 +93,6 @@ class AudioContentCommentListViewModel(
repository.registerComment(
contentId = contentId,
comment = comment,
isSecret = isSecret,
token = "Bearer ${SharedPreferenceManager.token}"
)
.subscribeOn(Schedulers.io())

View File

@ -8,14 +8,12 @@ class AudioContentCommentRepository(private val api: AudioContentApi) {
contentId: Long,
comment: String,
parentId: Long? = null,
isSecret: Boolean = false,
token: String
) = api.registerComment(
request = RegisterAudioContentCommentRequest(
comment = comment,
contentId = contentId,
parentId = parentId,
isSecret = isSecret
parentId = parentId
),
authHeader = token
)

View File

@ -1,25 +1,21 @@
package kr.co.vividnext.sodalive.audio_content.comment
import android.os.Parcelable
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
import kotlinx.parcelize.Parcelize
@Keep
data class GetAudioContentCommentListResponse(
@SerializedName("totalCount") val totalCount: Int,
@SerializedName("items") val items: List<GetAudioContentCommentListItem>
)
@Parcelize
@Keep
data class GetAudioContentCommentListItem(
@SerializedName("id") val id: Long,
@SerializedName("writerId") val writerId: Long,
@SerializedName("nickname") val nickname: String,
@SerializedName("profileUrl") val profileUrl: String,
@SerializedName("comment") val comment: String,
@SerializedName("isSecret") val isSecret: Boolean,
@SerializedName("donationCan") val donationCan: Int,
@SerializedName("date") val date: String,
@SerializedName("replyCount") val replyCount: Int

View File

@ -1,9 +1,7 @@
package kr.co.vividnext.sodalive.audio_content.comment
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class ModifyCommentRequest(
@SerializedName("commentId") val commentId: Long,
@SerializedName("comment") var comment: String? = null,

View File

@ -1,12 +1,9 @@
package kr.co.vividnext.sodalive.audio_content.comment
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class RegisterAudioContentCommentRequest(
@SerializedName("comment") val comment: String,
@SerializedName("contentId") val contentId: Long,
@SerializedName("parentId") val parentId: Long?,
@SerializedName("isSecret") val isSecret: Boolean
@SerializedName("parentId") val parentId: Long?
)

View File

@ -1,10 +1,8 @@
package kr.co.vividnext.sodalive.audio_content.curation
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
import kr.co.vividnext.sodalive.audio_content.main.GetAudioContentMainItem
@Keep
data class GetCurationContentResponse(
@SerializedName("totalCount") val totalCount: Int,
@SerializedName("items") val items: List<GetAudioContentMainItem>

View File

@ -2,7 +2,6 @@ package kr.co.vividnext.sodalive.audio_content.detail
import android.annotation.SuppressLint
import android.app.Activity
import android.app.Service
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
@ -10,11 +9,8 @@ import android.content.IntentFilter
import android.graphics.Rect
import android.os.Build
import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.view.LayoutInflater
import android.view.View
import android.view.inputmethod.InputMethodManager
import android.widget.RelativeLayout
import android.widget.SeekBar
import android.widget.Toast
@ -69,7 +65,6 @@ class AudioContentDetailActivity : BaseActivity<ActivityAudioContentDetailBindin
private val audioContentReceiver = AudioContentReceiver()
private var creatorId: Long = 0
private val handler = Handler(Looper.getMainLooper())
private var refresh = false
private var title = ""
@ -77,7 +72,6 @@ class AudioContentDetailActivity : BaseActivity<ActivityAudioContentDetailBindin
private lateinit var activityResultLauncher: ActivityResultLauncher<Intent>
private lateinit var audioContent: GetAudioContentDetailResponse
private lateinit var orderType: OrderType
private lateinit var imm: InputMethodManager
@SuppressLint("SetTextI18n")
override fun onNewIntent(intent: Intent) {
@ -98,8 +92,6 @@ class AudioContentDetailActivity : BaseActivity<ActivityAudioContentDetailBindin
audioContentId = intent.getLongExtra(Constants.EXTRA_AUDIO_CONTENT_ID, 0)
super.onCreate(savedInstanceState)
imm = getSystemService(Service.INPUT_METHOD_SERVICE) as InputMethodManager
if (audioContentId <= 0) {
Toast.makeText(applicationContext, "잘못된 요청입니다.", Toast.LENGTH_LONG).show()
finish()
@ -279,7 +271,7 @@ class AudioContentDetailActivity : BaseActivity<ActivityAudioContentDetailBindin
val dialog = LiveRoomDonationDialog(
this,
LayoutInflater.from(this)
) { can, message, _ ->
) { can, message ->
if (can <= 0) {
showToast("1캔 이상 후원하실 수 있습니다.")
} else if (message.isBlank()) {
@ -477,13 +469,8 @@ class AudioContentDetailActivity : BaseActivity<ActivityAudioContentDetailBindin
binding.tvCommentText.text = response.commentList[0].comment
binding.tvCommentText.visibility = View.VISIBLE
binding.rlInputComment.visibility = View.GONE
binding.tvSecret.visibility = View.GONE
binding.llComment.setOnClickListener {
showCommentBottomSheetDialog(
isShowSecret = response.existOrdered
)
}
binding.llComment.setOnClickListener { showCommentBottomSheetDialog() }
} else {
binding.tvCommentText.visibility = View.GONE
binding.rlInputComment.visibility = View.VISIBLE
@ -494,22 +481,9 @@ class AudioContentDetailActivity : BaseActivity<ActivityAudioContentDetailBindin
}
binding.ivCommentSend.setOnClickListener {
hideKeyboard()
val comment = binding.etComment.text.toString()
val isSecret = binding.tvSecret.isSelected
viewModel.registerComment(audioContentId, comment, isSecret)
binding.etComment.setText("")
binding.tvSecret.isSelected = false
}
if (response.existOrdered) {
binding.tvSecret.visibility = View.VISIBLE
binding.tvSecret.setOnClickListener {
binding.tvSecret.isSelected = !binding.tvSecret.isSelected
}
} else {
binding.tvSecret.visibility = View.GONE
viewModel.registerComment(audioContentId, comment)
}
binding.llComment.setOnClickListener {}
@ -520,11 +494,10 @@ class AudioContentDetailActivity : BaseActivity<ActivityAudioContentDetailBindin
}
}
private fun showCommentBottomSheetDialog(isShowSecret: Boolean) {
private fun showCommentBottomSheetDialog() {
val dialog = AudioContentCommentFragment(
creatorId = creatorId,
audioContentId = audioContentId,
isShowSecret = isShowSecret
audioContentId = audioContentId
)
dialog.show(
supportFragmentManager,
@ -946,15 +919,6 @@ class AudioContentDetailActivity : BaseActivity<ActivityAudioContentDetailBindin
}
}
private fun hideKeyboard() {
handler.postDelayed({
imm.hideSoftInputFromWindow(
window.decorView.applicationWindowToken,
InputMethodManager.HIDE_NOT_ALWAYS
)
}, 100)
}
inner class AudioContentReceiver : BroadcastReceiver() {
@SuppressLint("SetTextI18n")
override fun onReceive(context: Context?, intent: Intent?) {

View File

@ -254,7 +254,7 @@ class AudioContentDetailViewModel(
)
}
fun registerComment(audioContentId: Long, comment: String, isSecret: Boolean) {
fun registerComment(audioContentId: Long, comment: String) {
if (!isLoading.value!!) {
isLoading.value = true
}
@ -263,7 +263,6 @@ class AudioContentDetailViewModel(
commentRepository.registerComment(
contentId = audioContentId,
comment = comment,
isSecret = isSecret,
token = "Bearer ${SharedPreferenceManager.token}"
)
.subscribeOn(Schedulers.io())

View File

@ -1,11 +1,9 @@
package kr.co.vividnext.sodalive.audio_content.detail
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
import kr.co.vividnext.sodalive.audio_content.comment.GetAudioContentCommentListItem
import kr.co.vividnext.sodalive.audio_content.order.OrderType
@Keep
data class GetAudioContentDetailResponse(
@SerializedName("contentId") val contentId: Long,
@SerializedName("title") val title: String,
@ -41,14 +39,12 @@ data class GetAudioContentDetailResponse(
@SerializedName("creator") val creator: AudioContentCreator
)
@Keep
data class OtherContentResponse(
@SerializedName("contentId") val contentId: Long,
@SerializedName("title") val title: String,
@SerializedName("coverUrl") val coverUrl: String,
)
@Keep
data class AudioContentCreator(
@SerializedName("creatorId") val creatorId: Long,
@SerializedName("nickname") val nickname: String,

View File

@ -1,14 +1,11 @@
package kr.co.vividnext.sodalive.audio_content.detail
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class PutAudioContentLikeRequest(
@SerializedName("contentId") val contentId: Long
)
@Keep
data class PutAudioContentLikeResponse(
@SerializedName("like") val like: Boolean
)

View File

@ -1,9 +1,7 @@
package kr.co.vividnext.sodalive.audio_content.donation
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class AudioContentDonationRequest(
@SerializedName("contentId") val contentId: Long,
@SerializedName("donationCan") val donationCan: Int,

View File

@ -41,7 +41,6 @@ import kr.co.vividnext.sodalive.databinding.FragmentAudioContentMainBinding
import kr.co.vividnext.sodalive.explorer.profile.UserProfileActivity
import kr.co.vividnext.sodalive.explorer.profile.series.UserProfileSeriesListAdapter
import kr.co.vividnext.sodalive.extensions.dpToPx
import kr.co.vividnext.sodalive.mypage.alarm.AlarmListActivity
import kr.co.vividnext.sodalive.settings.event.EventDetailActivity
import kr.co.vividnext.sodalive.settings.notification.MemberRole
import org.koin.android.ext.android.inject
@ -122,24 +121,6 @@ class AudioContentMainFragment : BaseFragment<FragmentAudioContentMainBinding>(
}
)
}
binding.ivContentKeep.setOnClickListener {
startActivity(
Intent(
requireContext(),
AudioContentOrderListActivity::class.java
)
)
}
binding.ivAlarm.setOnClickListener {
startActivity(
Intent(
requireActivity(),
AlarmListActivity::class.java
)
)
}
}
private fun setupRecommendSeries() {

View File

@ -1,17 +1,14 @@
package kr.co.vividnext.sodalive.audio_content.main
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
import kr.co.vividnext.sodalive.settings.event.EventItem
@Keep
data class GetNewContentUploadCreator(
@SerializedName("creatorId") val creatorId: Long,
@SerializedName("creatorNickname") val creatorNickname: String,
@SerializedName("creatorProfileImageUrl") val creatorProfileImageUrl: String
)
@Keep
data class GetAudioContentMainItem(
@SerializedName("contentId") val contentId: Long,
@SerializedName("coverImageUrl") val coverImageUrl: String,
@ -23,14 +20,12 @@ data class GetAudioContentMainItem(
@SerializedName("duration") val duration: String
)
@Keep
data class GetAudioContentRanking(
@SerializedName("startDate") val startDate: String,
@SerializedName("endDate") val endDate: String,
@SerializedName("items") val items: List<GetAudioContentRankingItem>
)
@Keep
data class GetAudioContentRankingItem(
@SerializedName("contentId") val contentId: Long,
@SerializedName("title") val title: String,
@ -42,7 +37,6 @@ data class GetAudioContentRankingItem(
@SerializedName("creatorNickname") val creatorNickname: String
)
@Keep
data class GetAudioContentCurationResponse(
@SerializedName("curationId") val curationId: Long,
@SerializedName("title") val title: String,
@ -50,7 +44,6 @@ data class GetAudioContentCurationResponse(
@SerializedName("contents") val audioContents: List<GetAudioContentMainItem>
)
@Keep
data class GetAudioContentBannerResponse(
@SerializedName("type") val type: AudioContentBannerType,
@SerializedName("thumbnailImageUrl") val thumbnailImageUrl: String,

View File

@ -1,9 +1,7 @@
package kr.co.vividnext.sodalive.audio_content.modify
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class ModifyAudioContentRequest(
@SerializedName("contentId") val contentId: Long,
@SerializedName("title") val title: String?,

View File

@ -34,7 +34,7 @@ class AudioContentOrderListActivity : BaseActivity<ActivityAudioContentOrderList
override fun setupView() {
loadingDialog = LoadingDialog(this, layoutInflater)
binding.toolbar.tvBack.text = "콘텐츠 보관함"
binding.toolbar.tvBack.text = "구매목록"
binding.toolbar.tvBack.setOnClickListener { finish() }
adapter = AudioContentOrderListAdapter {

View File

@ -1,15 +1,12 @@
package kr.co.vividnext.sodalive.audio_content.order
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class GetAudioContentOrderListResponse(
@SerializedName("totalCount") val totalCount: Int,
@SerializedName("items") val items: List<GetAudioContentOrderListItem>
)
@Keep
data class GetAudioContentOrderListItem(
@SerializedName("contentId") val contentId: Long,
@SerializedName("coverImageUrl") val coverImageUrl: String,

View File

@ -1,9 +1,7 @@
package kr.co.vividnext.sodalive.audio_content.order
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class OrderRequest(
@SerializedName("contentId") val contentId: Long,
@SerializedName("orderType") val orderType: OrderType,

View File

@ -1,14 +1,11 @@
package kr.co.vividnext.sodalive.audio_content.series
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class GetSeriesListResponse(
@SerializedName("totalCount") val totalCount: Int,
@SerializedName("items") val items: List<SeriesListItem>
) {
@Keep
data class SeriesListItem(
@SerializedName("seriesId") val seriesId: Long,
@SerializedName("title") val title: String,
@ -21,7 +18,6 @@ data class GetSeriesListResponse(
@SerializedName("isPopular") val isPopular: Boolean
)
@Keep
data class SeriesListItemCreator(
@SerializedName("creatorId") val creatorId: Long,
@SerializedName("nickname") val nickname: String,

View File

@ -30,7 +30,6 @@ interface SeriesApi {
@Path("id") seriesId: Long,
@Query("page") page: Int,
@Query("size") size: Int,
@Query("sortType") sortType: SeriesListAllViewModel.SeriesSortType,
@Header("Authorization") authHeader: String
): Single<ApiResponse<GetSeriesContentListResponse>>

View File

@ -13,7 +13,7 @@ class SeriesListAllViewModel(private val repository: SeriesRepository) : BaseVie
enum class SeriesSortType {
@SerializedName("NEWEST") NEWEST,
@SerializedName("OLDEST") OLDEST
@SerializedName("POPULAR") POPULAR
}
private val _toastLiveData = MutableLiveData<String?>()

View File

@ -24,13 +24,11 @@ class SeriesRepository(private val api: SeriesApi) {
seriesId: Long,
page: Int,
size: Int,
sortType: SeriesListAllViewModel.SeriesSortType,
token: String
) = api.getSeriesContentList(
seriesId = seriesId,
page = page - 1,
size = size,
sortType = sortType,
authHeader = token
)

View File

@ -2,15 +2,11 @@ package kr.co.vividnext.sodalive.audio_content.series.content
import android.content.Intent
import android.os.Bundle
import android.widget.TextView
import android.widget.Toast
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import kr.co.vividnext.sodalive.R
import kr.co.vividnext.sodalive.audio_content.detail.AudioContentDetailActivity
import kr.co.vividnext.sodalive.audio_content.series.SeriesListAllViewModel
import kr.co.vividnext.sodalive.base.BaseActivity
import kr.co.vividnext.sodalive.common.Constants
import kr.co.vividnext.sodalive.common.LoadingDialog
@ -90,14 +86,6 @@ class SeriesContentAllActivity : BaseActivity<ActivitySeriesContentAllBinding>(
})
binding.rvSeriesContentAll.adapter = adapter
binding.tvSortNewest.setOnClickListener {
viewModel.changeSort(SeriesListAllViewModel.SeriesSortType.NEWEST)
}
binding.tvSortOldest.setOnClickListener {
viewModel.changeSort(SeriesListAllViewModel.SeriesSortType.OLDEST)
}
}
fun bindData() {
@ -116,42 +104,5 @@ class SeriesContentAllActivity : BaseActivity<ActivitySeriesContentAllBinding>(
viewModel.seriesContentListLiveData.observe(this) {
adapter.addItems(it)
}
viewModel.sortLiveData.observe(this) {
deselectSort()
selectSort(
when (it) {
SeriesListAllViewModel.SeriesSortType.OLDEST -> {
binding.tvSortOldest
}
else -> {
binding.tvSortNewest
}
}
)
}
}
private fun deselectSort() {
val color = ContextCompat.getColor(
applicationContext,
R.color.color_88e2e2e2
)
binding.tvSortNewest.setTextColor(color)
binding.tvSortOldest.setTextColor(color)
}
private fun selectSort(view: TextView) {
view.setTextColor(
ContextCompat.getColor(
applicationContext,
R.color.color_e2e2e2
)
)
adapter.clear()
viewModel.getSeriesContentList()
}
}

View File

@ -5,7 +5,6 @@ import androidx.lifecycle.MutableLiveData
import com.orhanobut.logger.Logger
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
import io.reactivex.rxjava3.schedulers.Schedulers
import kr.co.vividnext.sodalive.audio_content.series.SeriesListAllViewModel
import kr.co.vividnext.sodalive.audio_content.series.SeriesRepository
import kr.co.vividnext.sodalive.audio_content.series.detail.GetSeriesContentListItem
import kr.co.vividnext.sodalive.base.BaseViewModel
@ -24,10 +23,6 @@ class SeriesContentAllViewModel(private val repository: SeriesRepository) : Base
val seriesContentListLiveData: LiveData<List<GetSeriesContentListItem>>
get() = _seriesContentListLiveData
private var _sortLiveData = MutableLiveData(SeriesListAllViewModel.SeriesSortType.NEWEST)
val sortLiveData: LiveData<SeriesListAllViewModel.SeriesSortType>
get() = _sortLiveData
var seriesId = 0L
var page = 1
@ -43,7 +38,6 @@ class SeriesContentAllViewModel(private val repository: SeriesRepository) : Base
seriesId = seriesId,
page = page,
size = pageSize,
sortType = _sortLiveData.value!!,
token = "Bearer ${SharedPreferenceManager.token}"
)
.subscribeOn(Schedulers.io())
@ -76,12 +70,4 @@ class SeriesContentAllViewModel(private val repository: SeriesRepository) : Base
)
}
}
fun changeSort(sortType: SeriesListAllViewModel.SeriesSortType) {
if (_sortLiveData.value != sortType) {
page = 1
isLast = false
_sortLiveData.value = sortType
}
}
}

View File

@ -1,18 +1,15 @@
package kr.co.vividnext.sodalive.audio_content.series.detail
import android.os.Parcelable
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
import kotlinx.parcelize.Parcelize
@Keep
data class GetSeriesContentListResponse(
@SerializedName("totalCount") val totalCount: Int,
@SerializedName("items") val items: List<GetSeriesContentListItem>
)
@Parcelize
@Keep
data class GetSeriesContentListItem(
@SerializedName("contentId") val contentId: Long,
@SerializedName("title") val title: String,

View File

@ -1,12 +1,10 @@
package kr.co.vividnext.sodalive.audio_content.series.detail
import android.os.Parcelable
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
import kotlinx.parcelize.Parcelize
@Parcelize
@Keep
data class GetSeriesDetailResponse(
@SerializedName("seriesId") val seriesId: Long,
@SerializedName("title") val title: String,
@ -29,7 +27,6 @@ data class GetSeriesDetailResponse(
@SerializedName("contentCount") val contentCount: Int
) : Parcelable {
@Parcelize
@Keep
data class GetSeriesDetailCreator(
@SerializedName("creatorId") val creatorId: Long,
@SerializedName("nickname") val nickname: String,

View File

@ -1,9 +1,7 @@
package kr.co.vividnext.sodalive.audio_content.upload
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class CreateAudioContentRequest(
@SerializedName("title") val title: String,
@SerializedName("detail") val detail: String,

View File

@ -1,9 +1,7 @@
package kr.co.vividnext.sodalive.audio_content.upload.theme
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class GetAudioContentThemeResponse(
@SerializedName("id") val id: Long,
@SerializedName("theme") val theme: String,

View File

@ -1,9 +1,7 @@
package kr.co.vividnext.sodalive.common
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class ApiResponse<T>(
@SerializedName("success") val success: Boolean,
@SerializedName("data") val data: T? = null,

View File

@ -59,7 +59,6 @@ object Constants {
const val EXTRA_AUDIO_CONTENT_NEXT_ACTION = "audio_content_next_action"
const val EXTRA_AUDIO_CONTENT_ALERT_PREVIEW = "audio_content_alert_preview"
const val EXTRA_AUDIO_CONTENT_COVER_IMAGE_URL = "audio_content_cover_image_url"
const val EXTRA_IS_SHOW_SECRET = "extra_is_show_secret"
const val LIVE_SERVICE_NOTIFICATION_ID: Int = 2
const val ACTION_AUDIO_CONTENT_RECEIVER = "soda_live_action_content_receiver"

View File

@ -7,8 +7,6 @@ import android.app.PendingIntent
import android.app.Service
import android.content.Context
import android.content.Intent
import android.content.pm.ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK
import android.content.pm.ServiceInfo.FOREGROUND_SERVICE_TYPE_MICROPHONE
import android.os.Build
import android.os.IBinder
import androidx.core.app.NotificationCompat
@ -35,19 +33,7 @@ class SodaLiveService : Service() {
}
private fun updateNotification(content: String) {
val notification = createNotification(content)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
val foregroundServiceTypes = FOREGROUND_SERVICE_TYPE_MICROPHONE or
FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK
startForeground(
Constants.LIVE_SERVICE_NOTIFICATION_ID,
notification,
foregroundServiceTypes
)
} else {
startForeground(Constants.LIVE_SERVICE_NOTIFICATION_ID, notification)
}
startForeground(Constants.LIVE_SERVICE_NOTIFICATION_ID, createNotification(content))
}
private fun createNotification(content: String): Notification {

View File

@ -80,7 +80,6 @@ import kr.co.vividnext.sodalive.mypage.alarm.AlarmListRepository
import kr.co.vividnext.sodalive.mypage.alarm.AlarmListViewModel
import kr.co.vividnext.sodalive.mypage.auth.AuthApi
import kr.co.vividnext.sodalive.mypage.auth.AuthRepository
import kr.co.vividnext.sodalive.mypage.block.BlockMemberViewModel
import kr.co.vividnext.sodalive.mypage.can.CanApi
import kr.co.vividnext.sodalive.mypage.can.CanRepository
import kr.co.vividnext.sodalive.mypage.can.charge.iap.CanChargeIapViewModel
@ -116,7 +115,6 @@ import kr.co.vividnext.sodalive.settings.terms.TermsRepository
import kr.co.vividnext.sodalive.settings.terms.TermsViewModel
import kr.co.vividnext.sodalive.user.UserApi
import kr.co.vividnext.sodalive.user.UserRepository
import kr.co.vividnext.sodalive.user.UserViewModel
import kr.co.vividnext.sodalive.user.find_password.FindPasswordViewModel
import kr.co.vividnext.sodalive.user.login.LoginViewModel
import kr.co.vividnext.sodalive.user.signup.SignUpViewModel
@ -258,8 +256,6 @@ class AppDI(private val context: Context, isDebugMode: Boolean) {
viewModel { CanCouponViewModel(get()) }
viewModel { CanChargeIapViewModel(get()) }
viewModel { AlarmListViewModel(get()) }
viewModel { BlockMemberViewModel(get()) }
viewModel { UserViewModel(get(), get()) }
}
private val repositoryModule = module {

View File

@ -1,174 +0,0 @@
package kr.co.vividnext.sodalive.dialog
import android.graphics.Color
import android.graphics.drawable.ColorDrawable
import android.view.LayoutInflater
import android.view.Window
import android.view.WindowManager
import android.widget.Toast
import androidx.appcompat.app.AlertDialog
import androidx.fragment.app.FragmentActivity
import coil.load
import coil.transform.RoundedCornersTransformation
import kr.co.vividnext.sodalive.R
import kr.co.vividnext.sodalive.common.LoadingDialog
import kr.co.vividnext.sodalive.common.SharedPreferenceManager
import kr.co.vividnext.sodalive.databinding.DialogMemberProfileBinding
import kr.co.vividnext.sodalive.extensions.dpToPx
import kr.co.vividnext.sodalive.report.ProfileReportDialog
import kr.co.vividnext.sodalive.report.ReportType
import kr.co.vividnext.sodalive.report.UserReportDialog
import kr.co.vividnext.sodalive.settings.notification.MemberRole
import kr.co.vividnext.sodalive.user.UserViewModel
import org.koin.core.component.KoinComponent
import org.koin.core.component.inject
class MemberProfileDialog(
private val activity: FragmentActivity,
private val layoutInflater: LayoutInflater,
private val memberId: Long,
private val screenWidth: Int
) : KoinComponent {
private val viewModel: UserViewModel by inject()
private val alertDialog: AlertDialog
val dialogView = DialogMemberProfileBinding.inflate(layoutInflater)
private lateinit var loadingDialog: LoadingDialog
init {
val dialogBuilder = AlertDialog.Builder(activity)
dialogBuilder.setView(dialogView.root)
alertDialog = dialogBuilder.create()
alertDialog.setCancelable(false)
alertDialog.requestWindowFeature(Window.FEATURE_NO_TITLE)
alertDialog.window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
setupView()
bindData()
}
fun dismiss() {
alertDialog.dismiss()
}
fun show() {
viewModel.getMemberProfile(memberId) {
alertDialog.show()
val lp = WindowManager.LayoutParams()
lp.copyFrom(alertDialog.window?.attributes)
lp.width = screenWidth - (40.dpToPx()).toInt()
lp.height = WindowManager.LayoutParams.WRAP_CONTENT
alertDialog.window?.attributes = lp
}
}
private fun setupView() {
loadingDialog = LoadingDialog(activity, layoutInflater)
val profileLP = dialogView.ivProfile.layoutParams
profileLP.width = activity.resources.displayMetrics.widthPixels - (66.7f.dpToPx()).toInt()
profileLP.height = activity.resources.displayMetrics.widthPixels - (66.7f.dpToPx()).toInt()
dialogView.ivProfile.layoutParams = profileLP
dialogView.ivClose.setOnClickListener { dismiss() }
}
private fun bindData() {
viewModel.isLoading.observe(activity) {
if (it) {
loadingDialog.show(screenWidth)
} else {
loadingDialog.dismiss()
}
}
viewModel.toastLiveData.observe(activity) {
Toast.makeText(activity, it, Toast.LENGTH_SHORT).show()
}
viewModel.memberProfile.observe(activity) {
dialogView.ivProfile.load(it.profileImageUrl) {
crossfade(true)
placeholder(R.drawable.ic_place_holder)
transformations(RoundedCornersTransformation(8.dpToPx()))
}
dialogView.tvNickname.text = it.nickname
dialogView.tvBlockMember.text = if (it.isBlocked) {
"차단 해제"
} else {
"차단"
}
dialogView.tvBlockMember.setOnClickListener { _ ->
if (it.isBlocked) {
viewModel.memberUnBlock(it.memberId) { dismiss() }
} else {
showMemberBlockDialog(it.memberId, it.nickname)
}
}
dialogView.tvReportMember.setOnClickListener { _ ->
showMemberReportDialog(it.memberId)
}
dialogView.tvReportMemberProfile.setOnClickListener { _ ->
showProfileReportDialog(it.memberId)
}
}
}
private fun showMemberBlockDialog(memberId: Long, nickname: String) {
val message = if (SharedPreferenceManager.role == MemberRole.CREATOR.name) {
"""
${nickname}님을 차단하시겠습니까?
사용자를 차단하면 사용자는 아래 기능이 제한됩니다.
- 내가 개설한 라이브 입장 불가
- 나에게 메시지 보내기 불가
- 채널의 팬Talk 작성불가
""".trimIndent()
} else {
"""
${nickname}님을 차단하시겠습니까?
- 사용자를 차단하면 '차단한 사용자의 라이브 채팅' 보이지 않습니다.
""".trimIndent()
}
val dialog = android.app.AlertDialog.Builder(activity)
dialog.setTitle("사용자 차단")
dialog.setMessage(message)
dialog.setPositiveButton("차단") { _, _ ->
viewModel.memberBlock(memberId) { dismiss() }
}
dialog.setNegativeButton("취소") { _, _ -> }
dialog.show()
}
private fun showMemberReportDialog(memberId: Long) {
val dialog = UserReportDialog(activity, layoutInflater) {
viewModel.report(
type = ReportType.USER,
userId = memberId,
reason = it
) { dismiss() }
}
dialog.show(screenWidth)
}
private fun showProfileReportDialog(memberId: Long) {
val dialog = ProfileReportDialog(activity, layoutInflater) {
viewModel.report(
type = ReportType.PROFILE,
userId = memberId
) { dismiss() }
}
dialog.show(screenWidth)
}
}

View File

@ -1,14 +1,11 @@
package kr.co.vividnext.sodalive.explorer
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class GetExplorerResponse(
@SerializedName("sections") val sections: List<GetExplorerSectionResponse>
)
@Keep
data class GetExplorerSectionResponse(
@SerializedName("title") val title: String,
@SerializedName("coloredTitle") val coloredTitle: String?,
@ -17,7 +14,6 @@ data class GetExplorerSectionResponse(
@SerializedName("creators") val creators: List<GetExplorerSectionCreatorResponse>
)
@Keep
data class GetExplorerSectionCreatorResponse(
@SerializedName("id") val id: Long,
@SerializedName("nickname") val nickname: String,

View File

@ -1,15 +1,12 @@
package kr.co.vividnext.sodalive.explorer.profile
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class GetCheersResponse(
@SerializedName("totalCount") val totalCount: Int,
@SerializedName("cheers") val cheers: List<GetCheersResponseItem>
)
@Keep
data class GetCheersResponseItem(
@SerializedName("cheersId") val cheersId: Long,
@SerializedName("memberId") val memberId: Long,

View File

@ -1,11 +1,9 @@
package kr.co.vividnext.sodalive.explorer.profile
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
import kr.co.vividnext.sodalive.audio_content.series.GetSeriesListResponse
import kr.co.vividnext.sodalive.explorer.profile.creator_community.GetCommunityPostListResponse
@Keep
data class GetCreatorProfileResponse(
@SerializedName("creator")
val creator: CreatorResponse,
@ -29,7 +27,6 @@ data class GetCreatorProfileResponse(
val isBlock: Boolean
)
@Keep
data class CreatorResponse(
@SerializedName("creatorId") val creatorId: Long,
@SerializedName("profileUrl") val profileUrl: String,
@ -45,7 +42,6 @@ data class CreatorResponse(
@SerializedName("notificationRecipientCount") val notificationRecipientCount: Int
)
@Keep
data class UserDonationRankingResponse(
@SerializedName("userId") val userId: Long,
@SerializedName("nickname") val nickname: String,
@ -53,7 +49,6 @@ data class UserDonationRankingResponse(
@SerializedName("donationCan") val donationCan: Int
)
@Keep
data class LiveRoomResponse(
@SerializedName("roomId") val roomId: Long,
@SerializedName("title") val title: String,
@ -70,13 +65,11 @@ data class LiveRoomResponse(
@SerializedName("isPrivateRoom") val isPrivateRoom: Boolean
)
@Keep
data class GetAudioContentListResponse(
@SerializedName("totalCount") val totalCount: Int,
@SerializedName("items") val items: List<GetAudioContentListItem>
)
@Keep
data class GetAudioContentListItem(
@SerializedName("contentId") val contentId: Long,
@SerializedName("coverImageUrl") val coverImageUrl: String,
@ -94,7 +87,6 @@ data class GetAudioContentListItem(
@SerializedName("isSoldOut") val isSoldOut: Boolean
)
@Keep
data class GetCreatorActivitySummary(
@SerializedName("liveCount") val liveCount: Int,
@SerializedName("liveTime") val liveTime: Int,

View File

@ -1,7 +1,5 @@
package kr.co.vividnext.sodalive.explorer.profile
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class MemberBlockRequest(@SerializedName("blockMemberId") val blockMemberId: Long)

View File

@ -1,9 +1,7 @@
package kr.co.vividnext.sodalive.explorer.profile
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class PostCreatorNoticeRequest(
@SerializedName("notice")
val notice: String

View File

@ -38,7 +38,6 @@ import kr.co.vividnext.sodalive.common.LoadingDialog
import kr.co.vividnext.sodalive.common.SharedPreferenceManager
import kr.co.vividnext.sodalive.databinding.ActivityUserProfileBinding
import kr.co.vividnext.sodalive.databinding.ItemCreatorCommunityBinding
import kr.co.vividnext.sodalive.dialog.MemberProfileDialog
import kr.co.vividnext.sodalive.explorer.profile.cheers.UserProfileCheersAdapter
import kr.co.vividnext.sodalive.explorer.profile.creator_community.GetCommunityPostListResponse
import kr.co.vividnext.sodalive.explorer.profile.creator_community.all.CreatorCommunityAllActivity
@ -383,14 +382,6 @@ class UserProfileActivity : BaseActivity<ActivityUserProfileBinding>(
cancelButtonTitle = "취소",
cancelButtonClick = {}
).show(screenWidth)
},
onClickProfile = {
MemberProfileDialog(
activity = this@UserProfileActivity,
layoutInflater = layoutInflater,
memberId = it,
screenWidth = screenWidth
).show()
}
)

View File

@ -1,9 +1,7 @@
package kr.co.vividnext.sodalive.explorer.profile.cheers
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class PostWriteCheersRequest(
@SerializedName("parentId") val parentId: Long? = null,
@SerializedName("creatorId") val creatorId: Long,

View File

@ -1,9 +1,7 @@
package kr.co.vividnext.sodalive.explorer.profile.cheers
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class PutModifyCheersRequest(
@SerializedName("cheersId") val cheersId: Long,
@SerializedName("content") var content: String? = null,

View File

@ -20,8 +20,7 @@ class UserProfileCheersAdapter(
private val modifyReply: (Long, String?) -> Unit,
private val modifyCheers: (Long, String) -> Unit,
private val onClickReport: (Long) -> Unit,
private val onClickDelete: (Long) -> Unit,
private val onClickProfile: (Long) -> Unit
private val onClickDelete: (Long) -> Unit
) : RecyclerView.Adapter<UserProfileCheersAdapter.ViewHolder>() {
val items = mutableListOf<GetCheersResponseItem>()
@ -36,12 +35,6 @@ class UserProfileCheersAdapter(
binding.llCheerReply.visibility = View.GONE
binding.rlCheerReply.visibility = View.GONE
binding.ivProfile.setOnClickListener {
if (SharedPreferenceManager.userId != cheers.memberId) {
onClickProfile(cheers.memberId)
}
}
binding.ivProfile.load(cheers.profileUrl) {
crossfade(true)
placeholder(R.drawable.ic_place_holder)

View File

@ -1,18 +1,15 @@
package kr.co.vividnext.sodalive.explorer.profile.creator_community
import android.os.Parcelable
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
import kotlinx.parcelize.Parcelize
@Keep
data class GetCommunityPostCommentListResponse(
@SerializedName("totalCount") val totalCount: Int,
@SerializedName("items") val items: List<GetCommunityPostCommentListItem>
)
@Parcelize
@Keep
data class GetCommunityPostCommentListItem(
@SerializedName("id") val id: Long,
@SerializedName("writerId") val writerId: Long,

View File

@ -1,9 +1,7 @@
package kr.co.vividnext.sodalive.explorer.profile.creator_community
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class GetCommunityPostListResponse(
@SerializedName("postId") val postId: Long,
@SerializedName("creatorId") val creatorId: Long,

View File

@ -1,9 +1,7 @@
package kr.co.vividnext.sodalive.explorer.profile.creator_community.all
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class PostCommunityPostLikeRequest(
@SerializedName("postId") val postId: Long
)

View File

@ -1,9 +1,7 @@
package kr.co.vividnext.sodalive.explorer.profile.creator_community.all
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class PurchasePostRequest(
@SerializedName("postId") val postId: Long,
@SerializedName("timezone") val timezone: String,

View File

@ -1,9 +1,7 @@
package kr.co.vividnext.sodalive.explorer.profile.creator_community.all.comment
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class CreateCommunityPostCommentRequest(
@SerializedName("comment") val comment: String,
@SerializedName("postId") val postId: Long,

View File

@ -17,8 +17,7 @@ class CreatorCommunityCommentAdapter(
private val creatorId: Long,
private val modifyComment: (Long, String) -> Unit,
private val onClickDelete: (Long) -> Unit,
private val onItemClick: (GetCommunityPostCommentListItem) -> Unit,
private val onClickProfile: (Long) -> Unit
private val onItemClick: (GetCommunityPostCommentListItem) -> Unit
) : RecyclerView.Adapter<CreatorCommunityCommentAdapter.ViewHolder>() {
var items = mutableSetOf<GetCommunityPostCommentListItem>()
@ -34,12 +33,6 @@ class CreatorCommunityCommentAdapter(
transformations(CircleCropTransformation())
}
binding.ivCommentProfile.setOnClickListener {
if (SharedPreferenceManager.userId != item.writerId) {
onClickProfile(item.writerId)
}
}
binding.tvComment.text = item.comment
binding.tvCommentDate.text = item.date
binding.tvCommentNickname.text = item.nickname

View File

@ -20,7 +20,6 @@ import kr.co.vividnext.sodalive.common.Constants
import kr.co.vividnext.sodalive.common.LoadingDialog
import kr.co.vividnext.sodalive.common.SharedPreferenceManager
import kr.co.vividnext.sodalive.databinding.FragmentAudioContentCommentListBinding
import kr.co.vividnext.sodalive.dialog.MemberProfileDialog
import kr.co.vividnext.sodalive.extensions.dpToPx
import org.koin.android.ext.android.inject
@ -107,14 +106,6 @@ class CreatorCommunityCommentListFragment : BaseFragment<FragmentAudioContentCom
},
onItemClick = {
(parentFragment as CreatorCommunityCommentFragment).onClickComment(it)
},
onClickProfile = {
MemberProfileDialog(
activity = requireActivity(),
layoutInflater = layoutInflater,
memberId = it,
screenWidth = screenWidth
).show()
}
)

View File

@ -19,8 +19,7 @@ import kr.co.vividnext.sodalive.extensions.loadUrl
class CreatorCommunityCommentReplyAdapter(
private val creatorId: Long,
private val modifyComment: (Long, String) -> Unit,
private val onClickDelete: (Long) -> Unit,
private val onClickProfile: (Long) -> Unit
private val onClickDelete: (Long) -> Unit
) : RecyclerView.Adapter<CreatorCommunityCommentReplyViewHolder>() {
var items = mutableSetOf<GetCommunityPostCommentListItem>()
override fun onCreateViewHolder(
@ -47,8 +46,7 @@ class CreatorCommunityCommentReplyAdapter(
showOptionMenu = { context, view, commentId, writerId, creatorId, onClickModify ->
showOptionMenu(context, view, commentId, writerId, creatorId, onClickModify)
},
modifyComment = modifyComment,
onClickProfile = onClickProfile
modifyComment = modifyComment
)
}
}
@ -130,16 +128,9 @@ class CreatorCommunityCommentReplyItemViewHolder(
private val showOptionMenu: (
Context, View, Long, Long, Long, onClickModify: () -> Unit
) -> Unit,
private val modifyComment: (Long, String) -> Unit,
private val onClickProfile: (Long) -> Unit
private val modifyComment: (Long, String) -> Unit
) : CreatorCommunityCommentReplyViewHolder(binding) {
override fun bind(item: GetCommunityPostCommentListItem) {
binding.ivCommentProfile.setOnClickListener {
if (SharedPreferenceManager.userId != item.writerId) {
onClickProfile(item.writerId)
}
}
binding.ivCommentProfile.load(item.profileUrl) {
crossfade(true)
placeholder(R.drawable.ic_place_holder)

View File

@ -21,7 +21,6 @@ import kr.co.vividnext.sodalive.common.Constants
import kr.co.vividnext.sodalive.common.LoadingDialog
import kr.co.vividnext.sodalive.common.SharedPreferenceManager
import kr.co.vividnext.sodalive.databinding.FragmentAudioContentCommentReplyBinding
import kr.co.vividnext.sodalive.dialog.MemberProfileDialog
import kr.co.vividnext.sodalive.explorer.profile.creator_community.GetCommunityPostCommentListItem
import kr.co.vividnext.sodalive.extensions.dpToPx
import org.koin.android.ext.android.inject
@ -128,14 +127,6 @@ class CreatorCommunityCommentReplyFragment : BaseFragment<FragmentAudioContentCo
cancelButtonClick = {}
).show(screenWidth)
},
onClickProfile = {
MemberProfileDialog(
activity = requireActivity(),
layoutInflater = layoutInflater,
memberId = it,
screenWidth = screenWidth
).show()
}
).apply {
items.add(originalComment!!)
}

View File

@ -6,16 +6,10 @@ import android.media.AudioAttributes
import android.media.MediaPlayer
import android.net.Uri
import android.widget.Toast
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
import kr.co.vividnext.sodalive.audio_content.AudioContentPlayService
import java.io.IOException
@Keep
data class CreatorCommunityContentItem(
@SerializedName("contentId") val contentId: Long,
@SerializedName("url") val url: String
)
data class CreatorCommunityContentItem(val contentId: Long, val url: String)
class CreatorCommunityMediaPlayerManager(
private val context: Context,

View File

@ -1,9 +1,7 @@
package kr.co.vividnext.sodalive.explorer.profile.creator_community.modify
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class ModifyCommunityPostRequest(
@SerializedName("creatorCommunityId") val creatorCommunityId: Long,
@SerializedName("content") val content: String? = null,

View File

@ -1,9 +1,7 @@
package kr.co.vividnext.sodalive.explorer.profile.creator_community.write
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class CreateCommunityPostRequest(
@SerializedName("content") val content: String,
@SerializedName("price") val price: Int,

View File

@ -85,7 +85,7 @@ class RecordingVoiceFragment : BottomSheetDialogFragment() {
}
binding.ivRecordStart.setOnClickListener {
fileNameMedia = requireActivity().filesDir.path +
"/now_voice_${System.currentTimeMillis()}.m4a"
"/record_community_voice_${System.currentTimeMillis()}.m4a"
val fileMedia = File(fileNameMedia)
if (!fileMedia.exists()) {

View File

@ -1,10 +1,8 @@
package kr.co.vividnext.sodalive.explorer.profile.donation
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
import kr.co.vividnext.sodalive.explorer.profile.UserDonationRankingResponse
@Keep
data class GetDonationAllResponse(
@SerializedName("accumulatedCansToday")
val accumulatedCansToday: Int,

View File

@ -16,7 +16,6 @@ import kr.co.vividnext.sodalive.base.SodaDialog
import kr.co.vividnext.sodalive.common.Constants
import kr.co.vividnext.sodalive.common.LoadingDialog
import kr.co.vividnext.sodalive.databinding.ActivityUserProfileFantalkAllBinding
import kr.co.vividnext.sodalive.dialog.MemberProfileDialog
import kr.co.vividnext.sodalive.explorer.profile.cheers.UserProfileCheersAdapter
import kr.co.vividnext.sodalive.extensions.dpToPx
import kr.co.vividnext.sodalive.report.CheersReportDialog
@ -62,7 +61,6 @@ class UserProfileFantalkAllViewActivity : BaseActivity<ActivityUserProfileFantal
private fun setupCheersView() {
binding.ivSend.setOnClickListener {
hideKeyboard {
cheersAdapter.items.clear()
viewModel.writeCheers(
creatorId = userId,
cheersContent = binding.etCheer.text.toString()
@ -75,7 +73,6 @@ class UserProfileFantalkAllViewActivity : BaseActivity<ActivityUserProfileFantal
userId = userId,
enterReply = { cheersId, content ->
hideKeyboard {
cheersAdapter.items.clear()
viewModel.writeCheers(
parentCheersId = cheersId,
creatorId = userId,
@ -85,7 +82,6 @@ class UserProfileFantalkAllViewActivity : BaseActivity<ActivityUserProfileFantal
},
modifyReply = { cheersId, content ->
hideKeyboard {
cheersAdapter.items.clear()
viewModel.modifyCheers(
cheersId = cheersId,
creatorId = userId,
@ -95,7 +91,6 @@ class UserProfileFantalkAllViewActivity : BaseActivity<ActivityUserProfileFantal
},
modifyCheers = { cheersId, content ->
hideKeyboard {
cheersAdapter.items.clear()
viewModel.modifyCheers(
cheersId = cheersId,
creatorId = userId,
@ -112,7 +107,6 @@ class UserProfileFantalkAllViewActivity : BaseActivity<ActivityUserProfileFantal
desc = "삭제하시겠습니까?",
confirmButtonTitle = "삭제",
confirmButtonClick = {
cheersAdapter.items.clear()
viewModel.modifyCheers(
cheersId = it,
creatorId = userId,
@ -122,14 +116,6 @@ class UserProfileFantalkAllViewActivity : BaseActivity<ActivityUserProfileFantal
cancelButtonTitle = "취소",
cancelButtonClick = {}
).show(screenWidth)
},
onClickProfile = {
MemberProfileDialog(
activity = this@UserProfileFantalkAllViewActivity,
layoutInflater = layoutInflater,
memberId = it,
screenWidth = screenWidth
).show()
}
)

View File

@ -1,15 +1,12 @@
package kr.co.vividnext.sodalive.explorer.profile.follow
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class GetFollowerListResponse(
@SerializedName("totalCount") val totalCount: Int,
@SerializedName("items") val items: List<GetFollowerListResponseItem>
)
@Keep
data class GetFollowerListResponseItem(
@SerializedName("userId") val userId: Long,
@SerializedName("profileImage") val profileImage: String,

View File

@ -32,7 +32,7 @@ class FollowingCreatorActivity : BaseActivity<ActivityFollowingCreatorBinding>(
override fun setupView() {
loadingDialog = LoadingDialog(this, layoutInflater)
binding.toolbar.tvBack.text = "팔로잉 리스트"
binding.toolbar.tvBack.text = "팔로잉 채널 리스트"
binding.toolbar.tvBack.setOnClickListener { finish() }
adapter = FollowingCreatorAdapter(
@ -104,14 +104,6 @@ class FollowingCreatorActivity : BaseActivity<ActivityFollowingCreatorBinding>(
viewModel.creatorListTotalCountLiveData.observe(this) {
binding.tvTotalCount.text = " $it "
if (it > 0) {
binding.tvNone.visibility = View.GONE
binding.rvFollowingCreator.visibility = View.VISIBLE
} else {
binding.tvNone.visibility = View.VISIBLE
binding.rvFollowingCreator.visibility = View.GONE
}
}
}
}

View File

@ -16,7 +16,7 @@ class FollowingCreatorViewModel(
val creatorListLiveData: LiveData<List<GetCreatorFollowingAllListItem>>
get() = _creatorListLiveData
private val _creatorListTotalCountLiveData = MutableLiveData(0)
private val _creatorListTotalCountLiveData = MutableLiveData<Int>()
val creatorListTotalCountLiveData: LiveData<Int>
get() = _creatorListTotalCountLiveData

View File

@ -1,15 +1,12 @@
package kr.co.vividnext.sodalive.following
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class GetCreatorFollowingAllListResponse(
@SerializedName("totalCount") val totalCount: Int,
@SerializedName("items") val items: List<GetCreatorFollowingAllListItem>
)
@Keep
data class GetCreatorFollowingAllListItem(
@SerializedName("creatorId") val creatorId: Long,
@SerializedName("nickname") val nickname: String,

View File

@ -1,9 +1,7 @@
package kr.co.vividnext.sodalive.live
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class GetRoomListResponse(
@SerializedName("roomId") val roomId: Long,
@SerializedName("title") val title: String,

View File

@ -163,14 +163,12 @@ class LiveRepository(
roomId: Long,
can: Int,
message: String,
isSecret: Boolean,
token: String
): Single<ApiResponse<LiveRoomDonationResponse>> {
return api.donation(
request = LiveRoomDonationRequest(
roomId = roomId,
can = can,
isSecret = isSecret,
message = message,
container = "aos"
),

View File

@ -1,12 +1,10 @@
package kr.co.vividnext.sodalive.live
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
import kr.co.vividnext.sodalive.common.ApiResponse
import kr.co.vividnext.sodalive.live.recommend.GetRecommendLiveResponse
import kr.co.vividnext.sodalive.settings.event.GetEventResponse
@Keep
data class LiveSummary(
@SerializedName("liveNow") val liveNow: ApiResponse<List<GetRoomListResponse>>,
@SerializedName("liveReservation") val liveReservation: ApiResponse<List<GetRoomListResponse>>,

View File

@ -1,9 +1,7 @@
package kr.co.vividnext.sodalive.live.recommend
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class GetRecommendLiveResponse(
@SerializedName("imageUrl")
val imageUrl: String,

View File

@ -1,9 +1,7 @@
package kr.co.vividnext.sodalive.live.recommend_channel
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class GetRecommendChannelResponse(
@SerializedName("creatorId")
val creatorId: Long,

View File

@ -1,10 +1,8 @@
package kr.co.vividnext.sodalive.live.reservation
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
import java.util.TimeZone
@Keep
data class MakeLiveReservationRequest(
@SerializedName("roomId") val roomId: Long,
@SerializedName("container") val container: String = "aos",

View File

@ -1,12 +1,10 @@
package kr.co.vividnext.sodalive.live.reservation
import android.os.Parcelable
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
import kotlinx.parcelize.Parcelize
@Parcelize
@Keep
data class MakeLiveReservationResponse(
@SerializedName("reservationId") val reservationId: Long,
@SerializedName("nickname") val nickname: String,

View File

@ -1,9 +1,7 @@
package kr.co.vividnext.sodalive.live.reservation_status
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class CancelLiveReservationRequest(
@SerializedName("reservationId")
val reservationId: Long,

View File

@ -1,12 +1,10 @@
package kr.co.vividnext.sodalive.live.reservation_status
import android.os.Parcelable
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
import kotlinx.parcelize.Parcelize
@Parcelize
@Keep
data class GetLiveReservationResponse(
@SerializedName("reservationId") val reservationId: Long,
@SerializedName("roomId") val roomId: Long,

View File

@ -1,9 +1,7 @@
package kr.co.vividnext.sodalive.live.room
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class CancelLiveRequest(
@SerializedName("roomId") val roomId: Long,
@SerializedName("reason") val reason: String

View File

@ -1,9 +1,7 @@
package kr.co.vividnext.sodalive.live.room
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class EnterOrQuitLiveRoomRequest(
@SerializedName("roomId") val roomId: Long,
@SerializedName("container") val container: String = "aos",

View File

@ -249,7 +249,6 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
viewModel.getMemberCan()
viewModel.getRoomInfo(roomId)
viewModel.getBlockedMemberIdList()
binding.etChat.setOnFocusChangeListener { view, hasFocus ->
if (isNoChatting && hasFocus) {
@ -465,11 +464,10 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
binding.flDonation.setOnClickListener {
val dialog = LiveRoomDonationDialog(
this,
LayoutInflater.from(this),
isLiveDonation = true
) { can, message, isSecret ->
LayoutInflater.from(this)
) { can, message ->
if (can > 0) {
donation(can, message, isSecret)
donation(can, message)
} else {
showToast("1캔 이상 후원하실 수 있습니다.")
}
@ -523,7 +521,6 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
when (it.itemId) {
R.id.menu_user_block -> {
viewModel.memberUnBlock(userId)
viewModel.removeBlockedMember(memberId = userId)
}
R.id.menu_user_report -> {
@ -563,29 +560,18 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
}
private fun showMemberBlockDialog(userId: Long, nickname: String) {
val message = if (SharedPreferenceManager.role == MemberRole.CREATOR.name) {
"""
${nickname}님을 차단하시겠습니까?
사용자를 차단하면 사용자는 아래 기능이 제한됩니다.
- 내가 개설한 라이브 입장 불가
- 나에게 메시지 보내기 불가
- 채널의 팬Talk 작성불가
""".trimIndent()
} else {
"""
${nickname}님을 차단하시겠습니까?
- 사용자를 차단하면 '차단한 사용자의 라이브 채팅' 보이지 않습니다.
""".trimIndent()
}
val dialog = AlertDialog.Builder(this)
dialog.setTitle("사용자 차단")
dialog.setMessage(message)
dialog.setMessage(
"${nickname}님을 차단하시겠습니까?\n\n" +
"사용자를 차단하면 사용자는 아래 기능이 제한됩니다.\n" +
"- 내가 개설한 라이브 입장 불가\n" +
"- 나에게 메시지 보내기 불가\n" +
"- 내 채널의 팬Talk 작성불가"
)
dialog.setPositiveButton("차단") { _, _ ->
roomUserProfileDialog.dismiss()
viewModel.memberBlock(userId) {
viewModel.addBlockedMember(memberId = userId)
if (viewModel.roomInfoResponse.creatorId == SharedPreferenceManager.userId) {
kickOut(userId)
}
@ -717,35 +703,37 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
View.GONE
}
binding.flDonationMessageList.setOnClickListener {
LiveRoomDonationMessageDialog(
layoutInflater = LayoutInflater.from(this),
creatorId = response.creatorId,
activity = this,
donationMessageListLiveData = donationMessageViewModel
.donationMessageListLiveData,
donationMessageCountLiveData = donationMessageViewModel
.donationMessageCountLiveData,
getDonationMessageList = {
donationMessageViewModel.getDonationMessageList(roomId = roomId)
},
deleteDonationMessage = {
if (
response.creatorId == SharedPreferenceManager.userId &&
SharedPreferenceManager.role == MemberRole.CREATOR.name
) {
if (
response.creatorId == SharedPreferenceManager.userId &&
SharedPreferenceManager.role == MemberRole.CREATOR.name
) {
binding.flDonationMessageList.visibility = View.VISIBLE
binding.flDonationMessageList.setOnClickListener {
LiveRoomDonationMessageDialog(
layoutInflater = LayoutInflater.from(this),
activity = this,
donationMessageListLiveData = donationMessageViewModel
.donationMessageListLiveData,
donationMessageCountLiveData = donationMessageViewModel
.donationMessageCountLiveData,
getDonationMessageList = {
donationMessageViewModel.getDonationMessageList(roomId = roomId)
},
deleteDonationMessage = {
donationMessageViewModel.deleteDonationMessage(
roomId = roomId,
uuid = it
)
},
copyMessage = {
val clipboard = getSystemService(CLIPBOARD_SERVICE) as ClipboardManager
clipboard.setPrimaryClip(ClipData.newPlainText(it, it))
showToast("후원 히스토리가 복사되었습니다.")
}
},
copyMessage = {
val clipboard = getSystemService(CLIPBOARD_SERVICE) as ClipboardManager
clipboard.setPrimaryClip(ClipData.newPlainText(it, it))
showToast("후원 히스토리가 복사되었습니다.")
}
).show()
).show()
}
} else {
binding.flDonationMessageList.visibility = View.GONE
}
speakerListAdapter.managerId = response.creatorId
@ -1270,7 +1258,6 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
agora.muteAllRemoteAudioStreams(isSpeakerMute)
}
@SuppressLint("SetTextI18n")
private fun inputChat() {
val nickname = viewModel.getUserNickname(SharedPreferenceManager.userId.toInt())
val profileUrl = viewModel.getUserProfileUrl(SharedPreferenceManager.userId.toInt())
@ -1319,21 +1306,13 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
}
}
private fun donation(can: Int, message: String, isSecret: Boolean) {
val rawMessage = if (isSecret) {
"${can}캔을 비밀후원하셨습니다.\uD83D\uDCB0\uD83E\uDE99"
} else {
"${can}캔을 후원하셨습니다.\uD83D\uDCB0\uD83E\uDE99"
}
private fun donation(can: Int, message: String) {
val rawMessage = "${can}캔을 후원하셨습니다.\uD83D\uDCB0\uD83E\uDE99"
viewModel.donation(roomId, can, message, isSecret) { signature ->
viewModel.donation(roomId, can, message) { signature ->
val donationRawMessage = Gson().toJson(
LiveRoomChatRawMessage(
type = if (isSecret) {
LiveRoomChatRawMessageType.SECRET_DONATION
} else {
LiveRoomChatRawMessageType.DONATION
},
type = LiveRoomChatRawMessageType.DONATION,
message = rawMessage,
can = can,
signature = signature,
@ -1342,11 +1321,9 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
)
)
if (isSecret) {
agora.sendRawMessageToPeer(
receiverUid = viewModel.roomInfoResponse.creatorId.toString(),
rawMessage = donationRawMessage.toByteArray()
) {
agora.sendRawMessageToGroup(
rawMessage = donationRawMessage.toByteArray(),
onSuccess = {
handler.post {
val nickname =
viewModel.getUserNickname(SharedPreferenceManager.userId.toInt())
@ -1362,37 +1339,14 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
)
)
invalidateChat()
viewModel.addDonationCan(can)
addSignature(signature)
}
},
onFailure = {
viewModel.refundDonation(roomId)
}
} else {
agora.sendRawMessageToGroup(
rawMessage = donationRawMessage.toByteArray(),
onSuccess = {
handler.post {
val nickname =
viewModel.getUserNickname(SharedPreferenceManager.userId.toInt())
val profileUrl =
viewModel.getUserProfileUrl(SharedPreferenceManager.userId.toInt())
chatAdapter.items.add(
LiveRoomDonationChat(
profileUrl,
nickname,
rawMessage,
can,
donationMessage = message
)
)
invalidateChat()
viewModel.addDonationCan(can)
addSignature(signature)
}
},
onFailure = {
viewModel.refundDonation(roomId)
}
)
}
)
}
}
@ -1538,27 +1492,22 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
viewModel.addDonationCan(rawMessage.can)
}
}
else -> {}
}
} else {
val memberId = fromMember.userId.toLong()
if (viewModel.isNotBlockedMember(memberId)) {
val chat = message.text
val chat = message.text
if (chat.isNotBlank()) {
handler.post {
chatAdapter.items.add(
LiveRoomNormalChat(
userId = memberId,
profileUrl = profileUrl,
nickname = nickname,
rank = rank,
chat = chat
)
if (chat.isNotBlank()) {
handler.post {
chatAdapter.items.add(
LiveRoomNormalChat(
userId = fromMember.userId.toLong(),
profileUrl = profileUrl,
nickname = nickname,
rank = rank,
chat = chat
)
invalidateChat()
}
)
invalidateChat()
}
}
}
@ -1841,35 +1790,6 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
}
return
}
val message = Gson().fromJson(
rawMessage,
LiveRoomChatRawMessage::class.java
)
if (message.type == LiveRoomChatRawMessageType.SECRET_DONATION) {
val nickname = viewModel.getUserNickname(peerId.toInt())
val profileUrl = viewModel.getUserProfileUrl(peerId.toInt())
handler.post {
chatAdapter.items.add(
LiveRoomDonationChat(
profileUrl,
nickname,
message.message,
message.can,
message.donationMessage ?: ""
)
)
invalidateChat()
if (message.signature != null) {
addSignature(message.signature)
} else if (message.signatureImageUrl != null) {
addSignatureImage(message.signatureImageUrl)
}
}
}
}
}
}

View File

@ -90,8 +90,6 @@ class LiveRoomViewModel(
lateinit var getRealPathFromURI: (Uri) -> String?
private val blockedMemberIdList: MutableList<Long> = mutableListOf()
fun getUserNickname(memberId: Int): String {
for (manager in roomInfoResponse.managerList) {
if (manager.id.toInt() == memberId) {
@ -238,35 +236,6 @@ class LiveRoomViewModel(
return memberId == roomInfoResponse.creatorId.toInt()
}
fun isNotBlockedMember(memberId: Long): Boolean {
return !blockedMemberIdList.contains(memberId)
}
fun addBlockedMember(memberId: Long) {
blockedMemberIdList.add(memberId)
}
fun removeBlockedMember(memberId: Long) {
blockedMemberIdList.remove(memberId)
}
fun getBlockedMemberIdList() {
compositeDisposable.add(
userRepository.getBlockedMemberIdList(token = "Bearer ${SharedPreferenceManager.token}")
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(
{
if (it.success && it.data != null) {
this.blockedMemberIdList.clear()
this.blockedMemberIdList.addAll(it.data)
}
},
{}
)
)
}
fun getMemberCan() {
compositeDisposable.add(
userRepository.getMemberInfo(token = "Bearer ${SharedPreferenceManager.token}")
@ -278,7 +247,8 @@ class LiveRoomViewModel(
SharedPreferenceManager.can = it.data.can
}
},
{}
{
}
)
)
}
@ -551,18 +521,11 @@ class LiveRoomViewModel(
roomId: Long,
can: Int,
message: String,
isSecret: Boolean,
onSuccess: (LiveRoomDonationResponse?) -> Unit
) {
_isLoading.postValue(true)
compositeDisposable.add(
repository.donation(
roomId,
can,
message,
isSecret,
"Bearer ${SharedPreferenceManager.token}"
)
repository.donation(roomId, can, message, "Bearer ${SharedPreferenceManager.token}")
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(

View File

@ -1,9 +1,7 @@
package kr.co.vividnext.sodalive.live.room
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class SetManagerOrSpeakerOrAudienceRequest(
@SerializedName("roomId") val roomId: Long,
@SerializedName("memberId") val memberId: Long

View File

@ -1,10 +1,8 @@
package kr.co.vividnext.sodalive.live.room
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
import java.util.TimeZone
@Keep
data class StartLiveRequest(
@SerializedName("roomId") val roomId: Long,
@SerializedName("timezone") val timezone: String = TimeZone.getDefault().id,

View File

@ -9,7 +9,6 @@ import android.text.TextUtils
import android.text.style.ForegroundColorSpan
import android.text.style.StyleSpan
import android.view.View
import androidx.annotation.Keep
import androidx.core.content.ContextCompat
import androidx.core.content.res.ResourcesCompat
import androidx.core.view.setPadding
@ -47,7 +46,6 @@ abstract class LiveRoomChat {
)
}
@Keep
data class LiveRoomJoinChat(
val nickname: String
) : LiveRoomChat() {
@ -79,7 +77,6 @@ data class LiveRoomJoinChat(
}
}
@Keep
data class LiveRoomDonationStatusChat(
val response: GetLiveRoomDonationStatusResponse? = null,
val donationStatusString: String? = null
@ -149,7 +146,6 @@ data class LiveRoomDonationStatusChat(
}
}
@Keep
data class LiveRoomNormalChat(
@SerializedName("userId") val userId: Long,
@SerializedName("profileUrl") val profileUrl: String,
@ -242,7 +238,6 @@ data class LiveRoomNormalChat(
}
}
@Keep
data class LiveRoomDonationChat(
@SerializedName("profileUrl") val profileUrl: String,
@SerializedName("nickname") val nickname: String,
@ -304,48 +299,41 @@ data class LiveRoomDonationChat(
itemBinding.llMessageBg.setPadding(0)
itemBinding.llMessageBg.background = null
if (spChat.contains("비밀")) {
itemBinding.root.setBackgroundResource(
R.drawable.bg_round_corner_6_7_cc333333
)
} else {
itemBinding.root.setBackgroundResource(
when {
can >= 10000 -> {
R.drawable.bg_round_corner_6_7_ccc25264
}
can >= 5000 -> {
R.drawable.bg_round_corner_6_7_ccd85e37
}
can >= 1000 -> {
R.drawable.bg_round_corner_6_7_ccd38c38
}
can >= 500 -> {
R.drawable.bg_round_corner_6_7_cc59548f
}
can >= 100 -> {
R.drawable.bg_round_corner_6_7_cc4d6aa4
}
can >= 50 -> {
R.drawable.bg_round_corner_6_7_cc2d7390
}
else -> {
R.drawable.bg_round_corner_6_7_cc548f7d
}
itemBinding.root.setBackgroundResource(
when {
can >= 10000 -> {
R.drawable.bg_round_corner_6_7_ccc25264
}
)
}
can >= 5000 -> {
R.drawable.bg_round_corner_6_7_ccd85e37
}
can >= 1000 -> {
R.drawable.bg_round_corner_6_7_ccd38c38
}
can >= 500 -> {
R.drawable.bg_round_corner_6_7_cc59548f
}
can >= 100 -> {
R.drawable.bg_round_corner_6_7_cc4d6aa4
}
can >= 50 -> {
R.drawable.bg_round_corner_6_7_cc2d7390
}
else -> {
R.drawable.bg_round_corner_6_7_cc548f7d
}
}
)
itemBinding.root.setPadding(33)
}
}
@Keep
data class LiveRoomRouletteDonationChat(
@SerializedName("profileUrl") val profileUrl: String,
@SerializedName("nickname") val nickname: String,

View File

@ -1,10 +1,8 @@
package kr.co.vividnext.sodalive.live.room.chat
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
import kr.co.vividnext.sodalive.live.room.donation.LiveRoomDonationResponse
@Keep
data class LiveRoomChatRawMessage(
@SerializedName("type") val type: LiveRoomChatRawMessageType,
@SerializedName("message") val message: String,
@ -18,22 +16,14 @@ data class LiveRoomChatRawMessage(
enum class LiveRoomChatRawMessageType {
@SerializedName("DONATION")
DONATION,
@SerializedName("SECRET_DONATION")
SECRET_DONATION,
@SerializedName("SET_MANAGER")
SET_MANAGER,
@SerializedName("EDIT_ROOM_INFO")
EDIT_ROOM_INFO,
@SerializedName("DONATION_STATUS")
DONATION_STATUS,
@SerializedName("TOGGLE_ROULETTE")
TOGGLE_ROULETTE,
@SerializedName("ROULETTE_DONATION")
ROULETTE_DONATION
}

View File

@ -1,10 +1,8 @@
package kr.co.vividnext.sodalive.live.room.create
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
import kr.co.vividnext.sodalive.live.room.LiveRoomType
@Keep
data class CreateLiveRoomRequest(
@SerializedName("title") val title: String,
@SerializedName("price") val price: Int = 0,

View File

@ -1,9 +1,7 @@
package kr.co.vividnext.sodalive.live.room.create
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class CreateLiveRoomResponse(
@SerializedName("id") val id: Long?,
@SerializedName("channelName") val channelName: String?

View File

@ -1,9 +1,7 @@
package kr.co.vividnext.sodalive.live.room.create
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class GetRecentRoomInfoResponse(
@SerializedName("title") val title: String,
@SerializedName("notice") val notice: String,

View File

@ -1,12 +1,10 @@
package kr.co.vividnext.sodalive.live.room.detail
import android.os.Parcelable
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
import kotlinx.parcelize.Parcelize
@Parcelize
@Keep
data class GetRoomDetailResponse(
@SerializedName("roomId") val roomId: Long,
@SerializedName("price") val price: Int,
@ -24,10 +22,9 @@ data class GetRoomDetailResponse(
@SerializedName("numberOfParticipantsTotal") val numberOfParticipantsTotal: Int,
@SerializedName("manager") val manager: GetRoomDetailManager,
@SerializedName("participatingUsers") val participatingUsers: List<GetRoomDetailUser>
) : Parcelable
): Parcelable
@Parcelize
@Keep
data class GetRoomDetailManager(
@SerializedName("id") val id: Long,
@SerializedName("nickname") val nickname: String,
@ -41,7 +38,6 @@ data class GetRoomDetailManager(
) : Parcelable
@Parcelize
@Keep
data class GetRoomDetailUser(
@SerializedName("id") val id: Long,
@SerializedName("nickname") val nickname: String,

View File

@ -1,9 +1,7 @@
package kr.co.vividnext.sodalive.live.room.donation
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class DeleteLiveRoomDonationMessage(
@SerializedName("roomId") val roomId: Long,
@SerializedName("messageUUID") val messageUUID: String

View File

@ -1,16 +1,13 @@
package kr.co.vividnext.sodalive.live.room.donation
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class GetLiveRoomDonationStatusResponse(
@SerializedName("donationList") val donationList: List<GetLiveRoomDonationItem>,
@SerializedName("totalCount") val totalCount: Int,
@SerializedName("totalCan") val totalCan: Int
)
@Keep
data class GetLiveRoomDonationItem(
@SerializedName("profileImage") val profileImage: String,
@SerializedName("nickname") val nickname: String,

Some files were not shown because too many files have changed in this diff Show More