Skip to content

Commit b9518b1

Browse files
committed
Applies spotless changes
Change-Id: I1967defe9e8f0b43b87fccb501b1417c912b9946
1 parent 307e350 commit b9518b1

File tree

17 files changed

+21
-27
lines changed

17 files changed

+21
-27
lines changed

app/src/androidTestMock/java/com/example/android/architecture/blueprints/todoapp/tasks/TestUtils.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ import androidx.appcompat.widget.Toolbar
2121
import androidx.test.core.app.ActivityScenario
2222
import com.example.android.architecture.blueprints.todoapp.R
2323

24-
fun <T : Activity> ActivityScenario<T>.getToolbarNavigationContentDescription()
25-
: String {
24+
fun <T : Activity> ActivityScenario<T>.getToolbarNavigationContentDescription(): String {
2625
var description = ""
2726
onActivity {
2827
description =

app/src/main/java/com/example/android/architecture/blueprints/todoapp/addedittask/AddEditTaskFragment.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ class AddEditTaskFragment : Fragment() {
4444
private val viewModel by viewModels<AddEditTaskViewModel> { getViewModelFactory() }
4545

4646
override fun onCreateView(
47-
inflater: LayoutInflater, container: ViewGroup?,
47+
inflater: LayoutInflater,
48+
container: ViewGroup?,
4849
savedInstanceState: Bundle?
4950
): View? {
5051
val root = inflater.inflate(R.layout.addtask_frag, container, false)

app/src/main/java/com/example/android/architecture/blueprints/todoapp/data/Task.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ import java.util.UUID
2424
* Immutable model class for a Task. In order to compile with Room, we can't use @JvmOverloads to
2525
* generate multiple constructors.
2626
*
27-
* @param title title of the task
27+
* @param title title of the task
2828
* @param description description of the task
2929
* @param isCompleted whether or not this task is completed
30-
* @param id id of the task
30+
* @param id id of the task
3131
*/
3232
@Entity(tableName = "tasks")
3333
data class Task @JvmOverloads constructor(
@@ -40,7 +40,6 @@ data class Task @JvmOverloads constructor(
4040
val titleForList: String
4141
get() = if (title.isNotEmpty()) title else description
4242

43-
4443
val isActive
4544
get() = !isCompleted
4645

app/src/main/java/com/example/android/architecture/blueprints/todoapp/data/source/TasksDataSource.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import com.example.android.architecture.blueprints.todoapp.data.Task
2424
*/
2525
interface TasksDataSource {
2626

27-
2827
fun observeTasks(): LiveData<Result<List<Task>>>
2928

3029
suspend fun getTasks(): Result<List<Task>>

app/src/main/java/com/example/android/architecture/blueprints/todoapp/data/source/local/TasksDao.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ interface TasksDao {
8484
/**
8585
* Update the complete status of a task
8686
*
87-
* @param taskId id of the task
87+
* @param taskId id of the task
8888
* @param completed status to be updated
8989
*/
9090
@Query("UPDATE tasks SET completed = :completed WHERE entryid = :taskId")

app/src/main/java/com/example/android/architecture/blueprints/todoapp/data/source/local/TasksLocalDataSource.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ class TasksLocalDataSource internal constructor(
4747
}
4848

4949
override suspend fun refreshTask(taskId: String) {
50-
//NO-OP
50+
// NO-OP
5151
}
5252

5353
override suspend fun refreshTasks() {
54-
//NO-OP
54+
// NO-OP
5555
}
5656

5757
override suspend fun getTasks(): Result<List<Task>> = withContext(ioDispatcher) {

app/src/main/java/com/example/android/architecture/blueprints/todoapp/statistics/StatisticsFragment.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ class StatisticsFragment : Fragment() {
3737
private val viewModel by viewModels<StatisticsViewModel> { getViewModelFactory() }
3838

3939
override fun onCreateView(
40-
inflater: LayoutInflater, container: ViewGroup?,
40+
inflater: LayoutInflater,
41+
container: ViewGroup?,
4142
savedInstanceState: Bundle?
4243
): View? {
4344
viewDataBinding = DataBindingUtil.inflate(

app/src/main/java/com/example/android/architecture/blueprints/todoapp/taskdetail/TaskDetailViewModel.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ class TaskDetailViewModel(
103103
}
104104
}
105105

106-
107106
fun refresh() {
108107
// Refresh the repository and the task will be updated automatically.
109108
_task.value?.let {

app/src/main/java/com/example/android/architecture/blueprints/todoapp/tasks/TasksActivity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ class TasksActivity : AppCompatActivity() {
5353
}
5454

5555
override fun onSupportNavigateUp(): Boolean {
56-
return findNavController(R.id.nav_host_fragment).navigateUp(appBarConfiguration)
57-
|| super.onSupportNavigateUp()
56+
return findNavController(R.id.nav_host_fragment).navigateUp(appBarConfiguration) ||
57+
super.onSupportNavigateUp()
5858
}
5959

6060
private fun setupNavigationDrawer() {

app/src/main/java/com/example/android/architecture/blueprints/todoapp/tasks/TasksFragment.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ class TasksFragment : Fragment() {
5353
private lateinit var listAdapter: TasksAdapter
5454

5555
override fun onCreateView(
56-
inflater: LayoutInflater, container: ViewGroup?,
56+
inflater: LayoutInflater,
57+
container: ViewGroup?,
5758
savedInstanceState: Bundle?
5859
): View? {
5960
viewDataBinding = TasksFragBinding.inflate(inflater, container, false).apply {

0 commit comments

Comments
 (0)