1
0
Fork 0

No issue: remove useless @MenuRes annotation in History Fragment.

This annotation was not applied correctly and lint was unable to ensure
it was used properly: it declared an error in lint saying so but that
error was ignored. I did not know how to apply the annotation - and I
felt it had limited utility - so I removed it entirely in order to
permit the lint baseline file to be removed (it was the only error).
master
Michael Comella 2020-01-02 09:50:09 -08:00 committed by Mihai Adrian
parent c0f689a68d
commit 4bab493487
1 changed files with 0 additions and 2 deletions

View File

@ -12,7 +12,6 @@ import android.view.MenuInflater
import android.view.MenuItem
import android.view.View
import android.view.ViewGroup
import androidx.annotation.MenuRes
import androidx.appcompat.app.AlertDialog
import androidx.lifecycle.Observer
import androidx.lifecycle.lifecycleScope
@ -126,7 +125,6 @@ class HistoryFragment : LibraryPageFragment<HistoryItem>(), UserInteractionHandl
}
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
@MenuRes
val menuRes = when (historyStore.state.mode) {
HistoryFragmentState.Mode.Normal -> R.menu.library_menu
is HistoryFragmentState.Mode.Editing -> R.menu.history_select_multi