Skip to content

Commit

Permalink
Fixed ktlint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
miaboloix committed Aug 10, 2020
1 parent 3ff4be0 commit 161c679
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package org.oppia.app.administratorcontrols.administratorcontrolsitemviewmodel
import android.content.Intent
import androidx.appcompat.app.AlertDialog
import androidx.fragment.app.Fragment
import org.oppia.app.shim.IntentFactoryShimInterface
import org.oppia.app.R
import org.oppia.app.shim.IntentFactoryShimInterface

/** [ViewModel] for the recycler view in [AdministratorControlsFragment]. */
class AdministratorControlsAccountActionsViewModel(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import android.util.AttributeSet
import androidx.appcompat.widget.AppCompatImageView
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import org.oppia.app.R
import org.oppia.app.model.LessonThumbnail
import org.oppia.app.model.LessonThumbnailGraphic
import org.oppia.app.shim.ViewComponentFactory
import org.oppia.app.R
import org.oppia.util.gcsresource.DefaultResourceBucketName
import org.oppia.util.parser.DefaultGcsPrefix
import org.oppia.util.parser.ImageLoader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package org.oppia.app.help.faq

import androidx.appcompat.app.AppCompatActivity
import androidx.lifecycle.ViewModel
import org.oppia.app.R
import org.oppia.app.help.faq.faqItemViewModel.FAQContentViewModel
import org.oppia.app.help.faq.faqItemViewModel.FAQHeaderViewModel
import org.oppia.app.help.faq.faqItemViewModel.FAQItemViewModel
import org.oppia.app.R
import javax.inject.Inject

/** View model in [FAQListFragment]. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import android.content.res.Configuration
import android.content.res.Resources
import androidx.databinding.ObservableField
import androidx.lifecycle.ViewModel
import org.oppia.app.viewmodel.ObservableViewModel
import org.oppia.app.R
import org.oppia.app.viewmodel.ObservableViewModel

const val TOTAL_NUMBER_OF_SLIDES = 4

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package org.oppia.app.parser

import android.content.Context
import androidx.annotation.StringRes
import org.oppia.app.model.Fraction
import org.oppia.app.R
import org.oppia.app.model.Fraction
import org.oppia.domain.util.normalizeWhitespace

/** This class contains method that helps to parse string to fraction. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import androidx.lifecycle.Observer
import androidx.lifecycle.Transformations
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import org.oppia.app.R
import org.oppia.app.databinding.StateFragmentBinding
import org.oppia.app.fragment.FragmentScope
import org.oppia.app.model.AnswerOutcome
Expand All @@ -28,7 +29,6 @@ import org.oppia.app.player.audio.AudioFragment
import org.oppia.app.player.audio.AudioUiManager
import org.oppia.app.player.state.listener.RouteToHintsAndSolutionListener
import org.oppia.app.player.stopplaying.StopStatePlayingSessionListener
import org.oppia.app.R
import org.oppia.app.utility.LifecycleSafeTimerFactory
import org.oppia.app.utility.SplitScreenManager
import org.oppia.app.viewmodel.ViewModelProvider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import android.text.TextWatcher
import androidx.databinding.Bindable
import androidx.databinding.Observable
import androidx.databinding.ObservableField
import org.oppia.app.R
import org.oppia.app.model.Interaction
import org.oppia.app.model.InteractionObject
import org.oppia.app.model.UserAnswer
import org.oppia.app.parser.StringToFractionParser
import org.oppia.app.player.state.answerhandling.AnswerErrorCategory
import org.oppia.app.player.state.answerhandling.InteractionAnswerErrorOrAvailabilityCheckReceiver
import org.oppia.app.player.state.answerhandling.InteractionAnswerHandler
import org.oppia.app.R

/** [StateItemViewModel] for the fraction input interaction. */
class FractionInteractionViewModel(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package org.oppia.app.player.state.itemviewmodel
import android.content.Context
import androidx.databinding.Observable
import androidx.databinding.ObservableField
import org.oppia.app.R
import org.oppia.app.model.ClickOnImage
import org.oppia.app.model.ImageWithRegions
import org.oppia.app.model.Interaction
Expand All @@ -14,7 +15,6 @@ import org.oppia.app.utility.DefaultRegionClickedEvent
import org.oppia.app.utility.NamedRegionClickedEvent
import org.oppia.app.utility.OnClickableAreaClickedListener
import org.oppia.app.utility.RegionClickedEvent
import org.oppia.app.R

/** [StateItemViewModel] for image region selection. */
class ImageRegionSelectionInteractionViewModel(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import android.widget.TextView
import androidx.databinding.BindingAdapter
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import org.oppia.app.R
import org.oppia.app.shim.ViewBindingShimInterface
import org.oppia.app.shim.ViewComponentFactory
import org.oppia.app.R
import javax.inject.Inject

/** Custom view that is used for name or pin input with error messages. */
Expand Down
10 changes: 8 additions & 2 deletions app/src/main/java/org/oppia/app/shim/IntentFactoryShim.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,15 @@ class IntentFactoryShim @Inject constructor() : IntentFactoryShimInterface {
return intent
}

override fun createRecentlyPlayedActivityIntent(context: Context, internalProfileId: Int): Intent {
override fun createRecentlyPlayedActivityIntent(
context: Context,
internalProfileId: Int
): Intent {
val intent = Intent(context, RecentlyPlayedActivity::class.java)
intent.putExtra(RecentlyPlayedActivity.RECENTLY_PLAYED_ACTIVITY_INTERNAL_PROFILE_ID_KEY, internalProfileId)
intent.putExtra(
RecentlyPlayedActivity.RECENTLY_PLAYED_ACTIVITY_INTERNAL_PROFILE_ID_KEY,
internalProfileId
)
return intent
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package org.oppia.app.topic.info
import android.content.Context
import androidx.databinding.ObservableField
import androidx.lifecycle.ViewModel
import org.oppia.app.R
import org.oppia.app.fragment.FragmentScope
import org.oppia.app.model.Topic
import org.oppia.app.viewmodel.ObservableViewModel
import org.oppia.app.R
import org.oppia.util.parser.TopicHtmlParserEntityType
import javax.inject.Inject

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class RevisionCardFragmentPresenter @Inject constructor(
container,
/* attachToRoot= */ false
)
val view = binding.revisionCardExplanationText;
val view = binding.revisionCardExplanationText
val viewModel = getReviewCardViewModel()

viewModel.setSubtopicIdAndBinding(topicId, subtopicId, view)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import android.view.View
import android.widget.FrameLayout
import androidx.core.view.forEachIndexed
import androidx.core.view.isVisible
import org.oppia.app.R
import org.oppia.app.model.ImageWithRegions
import org.oppia.app.player.state.ImageRegionSelectionInteractionView
import org.oppia.app.shim.ViewBindingShimInterface
import org.oppia.app.R
import kotlin.math.roundToInt

/**
Expand Down

0 comments on commit 161c679

Please sign in to comment.