Skip to content

Commit

Permalink
Cleanup code using AS code inspection
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandr7035 committed Jul 19, 2022
1 parent c464edc commit 9918c45
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 83 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import java.lang.IllegalStateException

class CredentialViewPagerAdapter(
private val tabsCount: Int,
private val parentFragment: Fragment
parentFragment: Fragment
): FragmentStateAdapter(parentFragment) {
override fun getItemCount(): Int {
return tabsCount
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import by.alexandr7035.affinidi_id.core.extensions.debug
import by.alexandr7035.affinidi_id.domain.model.credentials.get_from_qr_code.ObtainVcFromQrCodeReqModel
import by.alexandr7035.affinidi_id.domain.model.credentials.get_from_qr_code.ObtainVcFromQrCodeResModel
import by.alexandr7035.affinidi_id.domain.model.credentials.stored_credentials.GetCredentialByIdReqModel
Expand All @@ -17,7 +16,6 @@ import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import timber.log.Timber
import javax.inject.Inject

@HiltViewModel
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package by.alexandr7035.affinidi_id.presentation.credential_details.model

import by.alexandr7035.affinidi_id.domain.model.credentials.stored_credentials.Credential
import by.alexandr7035.affinidi_id.presentation.credential_details.model.CredentialDetailsUi

interface CredentialToDetailsModelMapper {
fun map(credential: Credential): CredentialDetailsUi.Success
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package by.alexandr7035.affinidi_id.presentation.credentials_list

import android.net.wifi.hotspot2.pps.Credential
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
Expand All @@ -22,7 +21,6 @@ import by.kirich1409.viewbindingdelegate.viewBinding
import com.google.android.material.tabs.TabLayout
import dagger.hilt.android.AndroidEntryPoint
import timber.log.Timber
import java.lang.RuntimeException


@AndroidEntryPoint
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package by.alexandr7035.affinidi_id.presentation.credentials_list.filters

sealed class CredentialFilters() {
sealed class CredentialFilters {
object All: CredentialFilters()

object Active: CredentialFilters()
Expand Down

This file was deleted.

6 changes: 3 additions & 3 deletions app/src/main/res/layout/view_credential_item_detailed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@

<TextView
android:id="@+id/issuedByLabel"
android:text="Issued by"
android:text="@string/issued_by"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
Expand All @@ -97,15 +97,15 @@
android:id="@+id/issuer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="did:elem:123..3434"
tools:text="did:elem:123..3434"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"/>

<TextView
android:id="@+id/statusValue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="did:elem:123..3434"
tools:text="did:elem:123..3434"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/statusLabel"
app:layout_constraintBottom_toBottomOf="@id/statusLabel"/>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,6 @@

<string name="proof">Proof</string>
<string name="claims">Claims</string>
<string name="issued_by">Issued by</string>

</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import by.alexandr7035.affinidi_id.domain.model.login.LogOutModel
import by.alexandr7035.affinidi_id.domain.model.login.SignInModel
import by.alexandr7035.affinidi_id.domain.repository.LoginRepository
import by.alexandr7035.data.datasource.cache.credentials.CredentialsCacheDataSource
import by.alexandr7035.data.datasource.cache.credentials.CredentialsDAO
import by.alexandr7035.data.datasource.cache.secrets.SecretsStorage
import by.alexandr7035.data.datasource.cloud.ApiCallHelper
import by.alexandr7035.data.datasource.cloud.ApiCallWrapper
Expand Down

0 comments on commit 9918c45

Please sign in to comment.