Fix some error

main
h4h13 2019-08-04 15:38:34 +05:30
parent 0e3a2835dd
commit 6d84ad1028
10 changed files with 30 additions and 26 deletions

View File

@ -13,8 +13,8 @@ android {
vectorDrawables.useSupportLibrary = true vectorDrawables.useSupportLibrary = true
applicationId "code.name.monkey.retromusic" applicationId "code.name.monkey.retromusic"
versionCode 348 versionCode 352
versionName '3.3.000' versionName '3.3.100'
multiDexEnabled true multiDexEnabled true

View File

@ -19,7 +19,7 @@
}, },
{ {
"name": "ᴍɪʟɪɴᴅ ɢᴏᴇʟ | ᴘʟ2", "name": "ᴍɪʟɪɴᴅ ɢᴏᴇʟ | ᴘʟ2",
"summary": "Telegram group helper", "summary": "Github & Telegram maintainer",
"link": "https://t.me/MilindGoel15", "link": "https://t.me/MilindGoel15",
"profile_image": "https://i.imgur.com/ZIdLHYx.jpg" "profile_image": "https://i.imgur.com/ZIdLHYx.jpg"
}, },

View File

@ -7,6 +7,7 @@ import android.os.Bundle;
import android.webkit.WebView; import android.webkit.WebView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.widget.Toolbar; import androidx.appcompat.widget.Toolbar;
import com.google.android.material.appbar.AppBarLayout; import com.google.android.material.appbar.AppBarLayout;
@ -45,7 +46,7 @@ public class WhatsNewActivity extends AbsBaseActivity {
} }
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_whats_new); setContentView(R.layout.activity_whats_new);

View File

@ -151,7 +151,7 @@ open class BugReportActivity : AbsThemeActivity() {
private fun copyDeviceInfoToClipBoard() { private fun copyDeviceInfoToClipBoard() {
val clipboard = getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager val clipboard = getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
val clip = ClipData.newPlainText(getString(R.string.device_info), deviceInfo!!.toMarkdown()) val clip = ClipData.newPlainText(getString(R.string.device_info), deviceInfo!!.toMarkdown())
clipboard.primaryClip = clip clipboard.setPrimaryClip(clip)
Toast.makeText(this@BugReportActivity, R.string.copied_device_info_to_clipboard, Toast.LENGTH_LONG).show() Toast.makeText(this@BugReportActivity, R.string.copied_device_info_to_clipboard, Toast.LENGTH_LONG).show()
} }

View File

@ -30,8 +30,9 @@ class RemoveFromPlaylistDialog : DialogFragment() {
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
val songs = arguments!!.getParcelableArrayList<PlaylistSong>("songs") val songs = arguments!!.getParcelableArrayList<PlaylistSong>("songs")
val title: Int var title = 0
val content: CharSequence var content: CharSequence = ""
if (songs != null) {
if (songs.size > 1) { if (songs.size > 1) {
title = R.string.remove_songs_from_playlist_title title = R.string.remove_songs_from_playlist_title
content = Html.fromHtml(getString(code.name.monkey.retromusic.R.string.remove_x_songs_from_playlist, songs.size)) content = Html.fromHtml(getString(code.name.monkey.retromusic.R.string.remove_x_songs_from_playlist, songs.size))
@ -39,6 +40,7 @@ class RemoveFromPlaylistDialog : DialogFragment() {
title = R.string.remove_song_from_playlist_title title = R.string.remove_song_from_playlist_title
content = Html.fromHtml(getString(code.name.monkey.retromusic.R.string.remove_song_x_from_playlist, songs[0].title)) content = Html.fromHtml(getString(code.name.monkey.retromusic.R.string.remove_song_x_from_playlist, songs[0].title))
} }
}
return MaterialDialog(activity!!, BottomSheet()) return MaterialDialog(activity!!, BottomSheet())

View File

@ -64,8 +64,8 @@ class SongShareDialog : DialogFragment() {
}*/ }*/
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
val song: Song = arguments!!.getParcelable("song") val song: Song? = arguments!!.getParcelable("song")
val currentlyListening: String = getString(R.string.currently_listening_to_x_by_x, song.title, song.artistName) val currentlyListening: String = getString(R.string.currently_listening_to_x_by_x, song?.title, song?.artistName)
return MaterialDialog(activity!!, BottomSheet()) return MaterialDialog(activity!!, BottomSheet())
.title(R.string.what_do_you_want_to_share) .title(R.string.what_do_you_want_to_share)
@ -73,7 +73,7 @@ class SongShareDialog : DialogFragment() {
listItems(items = listOf(getString(code.name.monkey.retromusic.R.string.the_audio_file), "\u201C" + currentlyListening + "\u201D")) { dialog, index, text -> listItems(items = listOf(getString(code.name.monkey.retromusic.R.string.the_audio_file), "\u201C" + currentlyListening + "\u201D")) { dialog, index, text ->
when (index) { when (index) {
0 -> { 0 -> {
startActivity(Intent.createChooser(MusicUtil.createShareSongFileIntent(song, context), null)) startActivity(Intent.createChooser(song?.let { MusicUtil.createShareSongFileIntent(it, context) }, null))
} }
1 -> { 1 -> {
activity!!.startActivity( activity!!.startActivity(

View File

@ -101,8 +101,9 @@ class AdaptivePlaybackControlsFragment : AbsPlayerControlsFragment() {
val colorFinal = if (PreferenceUtil.getInstance().adaptiveColor) { val colorFinal = if (PreferenceUtil.getInstance().adaptiveColor) {
color color
} else { } else {
ThemeStore.accentColor(context!!).ripAlpha() ThemeStore.accentColor(context!!)
} }.ripAlpha()
TintHelper.setTintAuto(playPauseButton, MaterialValueHelper.getPrimaryTextColor(context, ColorUtil.isColorLight(colorFinal)), false) TintHelper.setTintAuto(playPauseButton, MaterialValueHelper.getPrimaryTextColor(context, ColorUtil.isColorLight(colorFinal)), false)
TintHelper.setTintAuto(playPauseButton, colorFinal, true) TintHelper.setTintAuto(playPauseButton, colorFinal, true)
ViewUtil.setProgressDrawable(progressSlider, colorFinal, true) ViewUtil.setProgressDrawable(progressSlider, colorFinal, true)

View File

@ -117,13 +117,13 @@ class BlurPlaybackControlsFragment : AbsPlayerControlsFragment() {
val colorFinal = if (PreferenceUtil.getInstance().adaptiveColor) { val colorFinal = if (PreferenceUtil.getInstance().adaptiveColor) {
color color
} else { } else {
ThemeStore.accentColor(requireContext()) ThemeStore.textColorSecondary(requireContext())
}.ripAlpha() }
text.setTextColor(colorFinal) text.setTextColor(colorFinal)
TintHelper.setTintAuto(progressSlider, colorFinal, false) TintHelper.setTintAuto(progressSlider, colorFinal.ripAlpha(), false)
volumeFragment?.setTintableColor(Color.WHITE) volumeFragment?.setTintableColor(Color.WHITE)
setFabColor(colorFinal) setFabColor(colorFinal.ripAlpha())
} }
private fun setFabColor(i: Int) { private fun setFabColor(i: Int) {

View File

@ -119,12 +119,12 @@ class MaterialControlsFragment : AbsPlayerControlsFragment() {
color color
} else { } else {
ThemeStore.textColorSecondary(context!!) ThemeStore.textColorSecondary(context!!)
}.ripAlpha() }
text.setTextColor(colorFinal) text.setTextColor(colorFinal)
ViewUtil.setProgressDrawable(progressSlider, colorFinal, false) ViewUtil.setProgressDrawable(progressSlider, colorFinal.ripAlpha(), true)
volumeFragment?.setTintable(colorFinal) volumeFragment?.setTintable(colorFinal.ripAlpha())
updatePlayPauseColor() updatePlayPauseColor()
updatePrevNextColor() updatePrevNextColor()

View File

@ -61,7 +61,7 @@ class LibraryPreferenceDialog : PreferenceDialogFragmentCompat() {
val categoryInfos: List<CategoryInfo> val categoryInfos: List<CategoryInfo>
if (savedInstanceState != null) { if (savedInstanceState != null) {
categoryInfos = savedInstanceState.getParcelableArrayList(PreferenceUtil.LIBRARY_CATEGORIES) categoryInfos = savedInstanceState.getParcelableArrayList(PreferenceUtil.LIBRARY_CATEGORIES)!!
} else { } else {
categoryInfos = PreferenceUtil.getInstance().libraryCategoryInfos categoryInfos = PreferenceUtil.getInstance().libraryCategoryInfos
} }