From a10c81abe0940f0eec86db0a0822d20e0d67da64 Mon Sep 17 00:00:00 2001 From: Skeletrobro <67814129+baronhsieh2005@users.noreply.github.com> Date: Sun, 1 Sep 2024 12:24:41 -0400 Subject: [PATCH 1/2] Coded dining insight start date + removed bottom bar for news fragment --- .../main/java/com/pennapps/labs/pennmobile/NewsFragment.kt | 5 ++++- .../labs/pennmobile/adapters/DiningInsightsCardAdapter.kt | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/NewsFragment.kt b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/NewsFragment.kt index 35249c62..a6f5edad 100644 --- a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/NewsFragment.kt +++ b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/NewsFragment.kt @@ -35,6 +35,7 @@ class NewsFragment : ListFragment() { private var mListView: ListView? = null private var mCustomTabsClient: CustomTabsClient? = null + private lateinit var mActivity: MainActivity private var customTabsIntent: CustomTabsIntent? = null private var share: Intent? = null private var session: CustomTabsSession? = null @@ -44,6 +45,7 @@ class NewsFragment : ListFragment() { private var connection: NewsCustomTabsServiceConnection? = null + private var _binding: FragmentNewsBinding? = null val binding get() = _binding!! @@ -162,7 +164,7 @@ class NewsFragment : ListFragment() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - val mActivity = activity as MainActivity + mActivity = activity as MainActivity mActivity.closeKeyboard() setHasOptionsMenu(true) @@ -175,6 +177,7 @@ class NewsFragment : ListFragment() { savedInstanceState: Bundle?, ): View { _binding = FragmentNewsBinding.inflate(inflater, container, false) + mActivity.hideBottomBar() return binding.root } diff --git a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/adapters/DiningInsightsCardAdapter.kt b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/adapters/DiningInsightsCardAdapter.kt index 40c498d6..bc48d3db 100644 --- a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/adapters/DiningInsightsCardAdapter.kt +++ b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/adapters/DiningInsightsCardAdapter.kt @@ -47,7 +47,7 @@ class DiningInsightsCardAdapter( private const val DINING_DOLLARS_PREDICTIONS = 2 private const val DINING_SWIPES_PREDICTIONS = 3 - const val START_DAY_OF_SEMESTER = "2024-01-18" + const val START_DAY_OF_SEMESTER = "2024-08-27" private const val DAYS_IN_SEMESTER = 117f } From 0d6b33a98b65514375eb164212008eb7071e55d8 Mon Sep 17 00:00:00 2001 From: Skeletrobro <67814129+baronhsieh2005@users.noreply.github.com> Date: Sun, 1 Sep 2024 12:32:14 -0400 Subject: [PATCH 2/2] Lint (Love you Rohan) --- .../pennapps/labs/pennmobile/NewsFragment.kt | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/NewsFragment.kt b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/NewsFragment.kt index a6f5edad..ec8859e0 100644 --- a/PennMobile/src/main/java/com/pennapps/labs/pennmobile/NewsFragment.kt +++ b/PennMobile/src/main/java/com/pennapps/labs/pennmobile/NewsFragment.kt @@ -33,20 +33,18 @@ class NewsFragment : ListFragment() { @JvmStatic val CUSTOM_TAB_PACKAGE_NAME = "com.android.chrome" } - private var mListView: ListView? = null - private var mCustomTabsClient: CustomTabsClient? = null - private lateinit var mActivity: MainActivity - private var customTabsIntent: CustomTabsIntent? = null - private var share: Intent? = null - private var session: CustomTabsSession? = null + private var _binding: FragmentNewsBinding? = null private var builder: CustomTabsIntent.Builder? = null + private var connection: NewsCustomTabsServiceConnection? = null + private var customTabsIntent: CustomTabsIntent? = null private var isCustomTabsSupported: Boolean = false + private var mCustomTabsClient: CustomTabsClient? = null + private var mListView: ListView? = null + private var session: CustomTabsSession? = null + private var share: Intent? = null + private lateinit var mActivity: MainActivity private lateinit var sharedPreferences: SharedPreferences - private var connection: NewsCustomTabsServiceConnection? = null - - - private var _binding: FragmentNewsBinding? = null val binding get() = _binding!! internal inner class CustomListAdapter(