Skip to content

Commit

Permalink
🗜️ refactor: perform code inspection and clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
kabirnayeem99 committed May 27, 2021
1 parent 211d97c commit 112ffee
Show file tree
Hide file tree
Showing 13 changed files with 4 additions and 77 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ import android.app.Application
import dagger.hilt.android.HiltAndroidApp

@HiltAndroidApp
class DuMarketingStudentApplication : Application() {
}
class DuMarketingStudentApplication : Application()
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ class AboutRepository @Inject constructor(var db: FirebaseFirestore) {
return aboutLiveData
}


companion object {
private const val TAG = "AboutRepository"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,4 @@ class EbookRepository @Inject constructor(var db: FirebaseFirestore) {
return ebookLiveData
}


companion object {
private const val TAG = "AboutRepository"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,4 @@ class FacultyRepository @Inject constructor(var db: FirebaseFirestore) {
return facultyDataListLiveData
}


companion object {
private const val TAG = "FacultyRepository"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,4 @@ class GalleryRepository @Inject constructor(var db: FirebaseFirestore) {
return allGalleryImagesLiveData
}

companion object {
private const val TAG = "GalleryRepository"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,4 @@ class MainActivity : AppCompatActivity() {
return super.onOptionsItemSelected(item)
}


companion object {
private const val TAG = "MainActivity"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class AboutFragment : Fragment() {
"\n" +
"which doesn't support calling feature."
).apply {
anchorView = binding.snackbarPlacement;
anchorView = binding.snackbarPlacement
show()
}
}
Expand All @@ -108,7 +108,7 @@ class AboutFragment : Fragment() {
Log.e(TAG, "setUpMailButton: $e")
showSnackBar("You don't have a mail app installed.")
.apply {
anchorView = binding.snackbarPlacement;
anchorView = binding.snackbarPlacement
setAction("Install") {
navigateToPlayStore(GMAIL_PACKAGE_NAME)
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,10 @@ class HomeFragment : Fragment() {
}
}


private val galleryViewModel: GalleryViewModel by lazy {
(activity as MainActivity).galleryViewModel
}


private val routineViewModel: RoutineViewModel by lazy {
(activity as MainActivity).routineViewModel
}
Expand Down Expand Up @@ -212,7 +210,6 @@ class HomeFragment : Fragment() {
}
}


companion object {
private const val TAG = "HomeFragment"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,5 @@ package io.github.kabirnayeem99.dumarketingstudent.util
object Config {
const val SHARED_PREFERENCES_NAME =
"com.hellohasan.sharedpreferences_2.my_shared_preferences"
const val USER_NAME = "user_name"
const val IS_STUDENT = "is_student"
const val AGE = "age"
const val BATCH_YEAR = "batch_year"
}
Original file line number Diff line number Diff line change
@@ -1,34 +1,16 @@
package io.github.kabirnayeem99.dumarketingstudent.util

import io.github.kabirnayeem99.dumarketingstudent.util.enums.FacultyPosts

object Constants {
const val ABOUT_DB_PATH: String = "About"
const val LATITUDE: String = "latitude"
const val LONGTITUDE: String = "longtitude"
const val FACULTY_STORAGE_PATH: String = "Faculty"
const val EBOOK_STORAGE_PATH: String = "Ebook"
const val ABOUT_DB_REF: String = "About"
const val GOOGLE_MAPS_PACKAGE_NAME = "com.google.android.apps.maps"
const val GMAIL_PACKAGE_NAME = "com.google.android.gm"
const val EBOOK_DB_REF: String = "Ebook"
const val ROUTINE_DB_REF: String = "Routine"
const val FACULTY_DB_COLLECTION_NAME: String = "Faculty"
const val NOTICE_IMAGE_PATH_STRING_FOLDER_NAME = "Notice"
const val GALLERY_IMAGE_PATH_STRING_FOLDER_NAME = "Gallery"
const val NOTICE_DB_REF = "Notice"
const val GALLERY_DB_REF = "Gallery"
const val CONTENT_URI = "content://"
const val DU_WEBSITE_URL = "https://www.du.ac.bd/"
const val EXTRA_FACULTY_DATA = "faculty data"
const val FILE_URI = "file://"
val TEACHER_POSTS = arrayOf(
"Select Teacher Post",
FacultyPosts.CHAIRMAN.values,
FacultyPosts.PROFESSOR.values,
FacultyPosts.ASSISTANT_PROFESSOR.values,
FacultyPosts.ASSOCIATE_PROFESSOR.values,
FacultyPosts.LECTURER.values,
FacultyPosts.HONORARY_PROFESSOR.values,
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,4 @@ class EbookDataAdapter(private val listener: (EbookData) -> Unit) :
}

override fun getItemCount() = differ.currentList.size

companion object {
private const val TAG = "EbookDataAdapter"
}
}
1 change: 1 addition & 0 deletions app/src/main/res/layout/list_item_faculty.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
android:id="@+id/tvFacultyPost"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableStart="ic_fluent_briefcase_24_sel"
android:text="Position" />

</LinearLayout>
Expand Down

0 comments on commit 112ffee

Please sign in to comment.