1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-11-14 10:47:30 +00:00

random cleanup

This commit is contained in:
Austin Huang 2021-07-24 19:30:24 -04:00
parent 94a5fdc6fe
commit 5ce6859837
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F
4 changed files with 5 additions and 6 deletions

View File

@ -1,7 +1,6 @@
package awais.instagrabber.webservices
import android.util.Log
import awais.instagrabber.models.enums.FollowingType
import awais.instagrabber.repositories.GraphQLService
import awais.instagrabber.repositories.responses.*
import awais.instagrabber.utils.Constants
@ -299,7 +298,7 @@ open class GraphQLRepository(private val service: GraphQLService) {
fun getInstance(): GraphQLRepository {
return INSTANCE ?: synchronized(this) {
val service: GraphQLService = RetrofitFactory.retrofitWeb.create(GraphQLService::class.java)
val service = RetrofitFactory.retrofitWeb.create(GraphQLService::class.java)
GraphQLRepository(service).also { INSTANCE = it }
}
}

View File

@ -189,7 +189,7 @@ class MediaRepository(private val service: MediaService) {
fun getInstance(): MediaRepository {
return INSTANCE ?: synchronized(this) {
val service: MediaService = retrofit.create(MediaService::class.java)
val service = retrofit.create(MediaService::class.java)
MediaRepository(service).also { INSTANCE = it }
}
}

View File

@ -10,7 +10,7 @@ import com.google.common.collect.ImmutableMap
import java.util.*
import java.util.stream.Collectors
class ProfileRepository private constructor(private val repository: ProfileService) {
open class ProfileRepository(private val repository: ProfileService) {
suspend fun fetchPosts(
userId: Long,
maxId: String?
@ -113,7 +113,7 @@ class ProfileRepository private constructor(private val repository: ProfileServi
fun getInstance(): ProfileRepository {
return INSTANCE ?: synchronized(this) {
val service: ProfileService = RetrofitFactory.retrofit.create(ProfileService::class.java)
val service = RetrofitFactory.retrofit.create(ProfileService::class.java)
ProfileRepository(service).also { INSTANCE = it }
}
}

View File

@ -6,7 +6,7 @@ import awais.instagrabber.webservices.RetrofitFactory.retrofitWeb
import com.google.common.collect.ImmutableMap
import retrofit2.Call
class SearchRepository(private val service: SearchService) {
open class SearchRepository(private val service: SearchService) {
suspend fun search(
isLoggedIn: Boolean,
query: String,