diff --git a/app/src/main/java/com/huanchengfly/tieba/post/activities/PhotoViewActivity.kt b/app/src/main/java/com/huanchengfly/tieba/post/activities/PhotoViewActivity.kt index 4d051c3f..00b7fe73 100644 --- a/app/src/main/java/com/huanchengfly/tieba/post/activities/PhotoViewActivity.kt +++ b/app/src/main/java/com/huanchengfly/tieba/post/activities/PhotoViewActivity.kt @@ -288,20 +288,25 @@ class PhotoViewActivity : BaseActivity(), OnChangeBottomBarVisibilityListener, T const val OBJ_TYPE_THREAD_PAGE = "pb" const val OBJ_TYPE_FORUM_PAGE = "frs" private val handler = Handler() + + @JvmStatic fun launch(context: Context, photoViewBean: PhotoViewBean) { launch(context, arrayOf(photoViewBean)) } + @JvmStatic fun launch(context: Context, photoViewBeanList: List) { launch(context, photoViewBeanList.toTypedArray(), 0) } + @JvmStatic fun launch(context: Context, photoViewBeanList: List, position: Int) { launch(context, photoViewBeanList.toTypedArray(), position) } + @JvmStatic @JvmOverloads - fun launch(context: Context, photoViewBeans: Array?, position: Int = 0) { + fun launch(context: Context, photoViewBeans: Array, position: Int = 0) { context.startActivity(Intent(context, PhotoViewActivity::class.java) .putExtra(EXTRA_BEANS, photoViewBeans) .putExtra(EXTRA_POSITION, position)