mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-28 09:38:14 +03:00
Remove unused (legacy) UserUtils
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
e7756003d7
commit
dac99a5db8
2 changed files with 12 additions and 23 deletions
|
@ -168,7 +168,6 @@ import com.nextcloud.talk.utils.bundle.BundleKeys.KEY_ROOM_ID
|
||||||
import com.nextcloud.talk.utils.bundle.BundleKeys.KEY_ROOM_TOKEN
|
import com.nextcloud.talk.utils.bundle.BundleKeys.KEY_ROOM_TOKEN
|
||||||
import com.nextcloud.talk.utils.bundle.BundleKeys.KEY_USER_ENTITY
|
import com.nextcloud.talk.utils.bundle.BundleKeys.KEY_USER_ENTITY
|
||||||
import com.nextcloud.talk.utils.database.user.CapabilitiesUtilNew
|
import com.nextcloud.talk.utils.database.user.CapabilitiesUtilNew
|
||||||
import com.nextcloud.talk.utils.database.user.UserUtils
|
|
||||||
import com.nextcloud.talk.utils.permissions.PlatformPermissionUtil
|
import com.nextcloud.talk.utils.permissions.PlatformPermissionUtil
|
||||||
import com.nextcloud.talk.utils.rx.DisposableSet
|
import com.nextcloud.talk.utils.rx.DisposableSet
|
||||||
import com.nextcloud.talk.utils.singletons.ApplicationWideCurrentRoomHolder
|
import com.nextcloud.talk.utils.singletons.ApplicationWideCurrentRoomHolder
|
||||||
|
@ -222,16 +221,10 @@ class ChatController(args: Bundle) :
|
||||||
private val binding: ControllerChatBinding by viewBinding(ControllerChatBinding::bind)
|
private val binding: ControllerChatBinding by viewBinding(ControllerChatBinding::bind)
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@JvmField
|
lateinit var ncApi: NcApi
|
||||||
var ncApi: NcApi? = null
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@JvmField
|
lateinit var eventBus: EventBus
|
||||||
var userUtils: UserUtils? = null
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
@JvmField
|
|
||||||
var eventBus: EventBus? = null
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
lateinit var permissionUtil: PlatformPermissionUtil
|
lateinit var permissionUtil: PlatformPermissionUtil
|
||||||
|
@ -332,7 +325,7 @@ class ChatController(args: Bundle) :
|
||||||
|
|
||||||
val startNanoTime = System.nanoTime()
|
val startNanoTime = System.nanoTime()
|
||||||
Log.d(TAG, "getRoomInfo - getRoom - calling: " + startNanoTime)
|
Log.d(TAG, "getRoomInfo - getRoom - calling: " + startNanoTime)
|
||||||
ncApi?.getRoom(credentials, ApiUtils.getUrlForRoom(apiVersion, conversationUser.baseUrl, roomToken))
|
ncApi.getRoom(credentials, ApiUtils.getUrlForRoom(apiVersion, conversationUser.baseUrl, roomToken))
|
||||||
?.subscribeOn(Schedulers.io())
|
?.subscribeOn(Schedulers.io())
|
||||||
?.observeOn(AndroidSchedulers.mainThread())
|
?.observeOn(AndroidSchedulers.mainThread())
|
||||||
?.subscribe(object : Observer<RoomOverall> {
|
?.subscribe(object : Observer<RoomOverall> {
|
||||||
|
@ -399,7 +392,7 @@ class ChatController(args: Bundle) :
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.d(TAG, "handleFromNotification - getRooms - calling")
|
Log.d(TAG, "handleFromNotification - getRooms - calling")
|
||||||
ncApi?.getRooms(credentials, ApiUtils.getUrlForRooms(apiVersion, conversationUser?.baseUrl))
|
ncApi.getRooms(credentials, ApiUtils.getUrlForRooms(apiVersion, conversationUser?.baseUrl))
|
||||||
?.subscribeOn(Schedulers.io())?.observeOn(AndroidSchedulers.mainThread())
|
?.subscribeOn(Schedulers.io())?.observeOn(AndroidSchedulers.mainThread())
|
||||||
?.subscribe(object : Observer<RoomsOverall> {
|
?.subscribe(object : Observer<RoomsOverall> {
|
||||||
override fun onSubscribe(d: Disposable) {
|
override fun onSubscribe(d: Disposable) {
|
||||||
|
@ -1687,7 +1680,7 @@ class ChatController(args: Bundle) :
|
||||||
"onAttach: Controller: " + System.identityHashCode(this).toString() +
|
"onAttach: Controller: " + System.identityHashCode(this).toString() +
|
||||||
" Activity: " + System.identityHashCode(activity).toString()
|
" Activity: " + System.identityHashCode(activity).toString()
|
||||||
)
|
)
|
||||||
eventBus?.register(this)
|
eventBus.register(this)
|
||||||
|
|
||||||
if (conversationUser?.userId != "?" &&
|
if (conversationUser?.userId != "?" &&
|
||||||
CapabilitiesUtilNew.hasSpreedFeatureCapability(conversationUser, "mention-flag") ?: false &&
|
CapabilitiesUtilNew.hasSpreedFeatureCapability(conversationUser, "mention-flag") ?: false &&
|
||||||
|
@ -1777,7 +1770,7 @@ class ChatController(args: Bundle) :
|
||||||
" Activity: " + System.identityHashCode(activity).toString()
|
" Activity: " + System.identityHashCode(activity).toString()
|
||||||
)
|
)
|
||||||
|
|
||||||
eventBus?.unregister(this)
|
eventBus.unregister(this)
|
||||||
|
|
||||||
if (activity != null) {
|
if (activity != null) {
|
||||||
activity?.findViewById<View>(R.id.toolbar)?.setOnClickListener(null)
|
activity?.findViewById<View>(R.id.toolbar)?.setOnClickListener(null)
|
||||||
|
@ -1849,7 +1842,7 @@ class ChatController(args: Bundle) :
|
||||||
|
|
||||||
val startNanoTime = System.nanoTime()
|
val startNanoTime = System.nanoTime()
|
||||||
Log.d(TAG, "joinRoomWithPassword - joinRoom - calling: " + startNanoTime)
|
Log.d(TAG, "joinRoomWithPassword - joinRoom - calling: " + startNanoTime)
|
||||||
ncApi?.joinRoom(
|
ncApi.joinRoom(
|
||||||
credentials,
|
credentials,
|
||||||
ApiUtils.getUrlForParticipantsActive(apiVersion, conversationUser?.baseUrl, roomToken),
|
ApiUtils.getUrlForParticipantsActive(apiVersion, conversationUser?.baseUrl, roomToken),
|
||||||
roomPassword
|
roomPassword
|
||||||
|
@ -1935,7 +1928,7 @@ class ChatController(args: Bundle) :
|
||||||
|
|
||||||
val startNanoTime = System.nanoTime()
|
val startNanoTime = System.nanoTime()
|
||||||
Log.d(TAG, "leaveRoom - leaveRoom - calling: " + startNanoTime)
|
Log.d(TAG, "leaveRoom - leaveRoom - calling: " + startNanoTime)
|
||||||
ncApi?.leaveRoom(
|
ncApi.leaveRoom(
|
||||||
credentials,
|
credentials,
|
||||||
ApiUtils.getUrlForParticipantsActive(
|
ApiUtils.getUrlForParticipantsActive(
|
||||||
apiVersion,
|
apiVersion,
|
||||||
|
@ -2150,7 +2143,7 @@ class ChatController(args: Bundle) :
|
||||||
if (lookIntoFuture > 0) {
|
if (lookIntoFuture > 0) {
|
||||||
val finalTimeout = timeout
|
val finalTimeout = timeout
|
||||||
Log.d(TAG, "pullChatMessages - pullChatMessages[lookIntoFuture > 0] - calling")
|
Log.d(TAG, "pullChatMessages - pullChatMessages[lookIntoFuture > 0] - calling")
|
||||||
ncApi?.pullChatMessages(
|
ncApi.pullChatMessages(
|
||||||
credentials,
|
credentials,
|
||||||
ApiUtils.getUrlForChat(apiVersion, conversationUser?.baseUrl, roomToken), fieldMap
|
ApiUtils.getUrlForChat(apiVersion, conversationUser?.baseUrl, roomToken), fieldMap
|
||||||
)
|
)
|
||||||
|
@ -2192,7 +2185,7 @@ class ChatController(args: Bundle) :
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
Log.d(TAG, "pullChatMessages - pullChatMessages[lookIntoFuture <= 0] - calling")
|
Log.d(TAG, "pullChatMessages - pullChatMessages[lookIntoFuture <= 0] - calling")
|
||||||
ncApi?.pullChatMessages(
|
ncApi.pullChatMessages(
|
||||||
credentials,
|
credentials,
|
||||||
ApiUtils.getUrlForChat(apiVersion, conversationUser?.baseUrl, roomToken), fieldMap
|
ApiUtils.getUrlForChat(apiVersion, conversationUser?.baseUrl, roomToken), fieldMap
|
||||||
)
|
)
|
||||||
|
@ -2700,7 +2693,7 @@ class ChatController(args: Bundle) :
|
||||||
apiVersion = ApiUtils.getChatApiVersion(conversationUser, intArrayOf(1))
|
apiVersion = ApiUtils.getChatApiVersion(conversationUser, intArrayOf(1))
|
||||||
}
|
}
|
||||||
|
|
||||||
ncApi?.deleteChatMessage(
|
ncApi.deleteChatMessage(
|
||||||
credentials,
|
credentials,
|
||||||
ApiUtils.getUrlForChatMessage(
|
ApiUtils.getUrlForChatMessage(
|
||||||
apiVersion,
|
apiVersion,
|
||||||
|
@ -3066,7 +3059,7 @@ class ChatController(args: Bundle) :
|
||||||
null
|
null
|
||||||
)
|
)
|
||||||
|
|
||||||
ncApi?.createRoom(
|
ncApi.createRoom(
|
||||||
credentials,
|
credentials,
|
||||||
retrofitBucket.url, retrofitBucket.queryMap
|
retrofitBucket.url, retrofitBucket.queryMap
|
||||||
)
|
)
|
||||||
|
|
|
@ -45,7 +45,6 @@ import com.nextcloud.talk.controllers.base.NewBaseController
|
||||||
import com.nextcloud.talk.controllers.util.viewBinding
|
import com.nextcloud.talk.controllers.util.viewBinding
|
||||||
import com.nextcloud.talk.databinding.ControllerGeocodingBinding
|
import com.nextcloud.talk.databinding.ControllerGeocodingBinding
|
||||||
import com.nextcloud.talk.utils.bundle.BundleKeys
|
import com.nextcloud.talk.utils.bundle.BundleKeys
|
||||||
import com.nextcloud.talk.utils.database.user.UserUtils
|
|
||||||
import fr.dudie.nominatim.client.TalkJsonNominatimClient
|
import fr.dudie.nominatim.client.TalkJsonNominatimClient
|
||||||
import fr.dudie.nominatim.model.Address
|
import fr.dudie.nominatim.model.Address
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
|
@ -69,9 +68,6 @@ class GeocodingController(args: Bundle) :
|
||||||
@Inject
|
@Inject
|
||||||
lateinit var ncApi: NcApi
|
lateinit var ncApi: NcApi
|
||||||
|
|
||||||
@Inject
|
|
||||||
lateinit var userUtils: UserUtils
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
lateinit var okHttpClient: OkHttpClient
|
lateinit var okHttpClient: OkHttpClient
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue