Skip to content

Commit

Permalink
Merge pull request #43 from QuaNilo/velez
Browse files Browse the repository at this point in the history
Removed useless classes, removed unused imports
  • Loading branch information
QuaNilo authored Dec 3, 2023
2 parents 08c7950 + c465339 commit 6ec9e4a
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 46 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
- name: Run Unit Tests
run: ./gradlew test


- name: Send Discord notification
uses: stegzilla/discord-notify@v2
with:
Expand All @@ -36,4 +35,3 @@ jobs:
include_image: true
username: 'Yo mama'
avatar_url: 'https://i.pinimg.com/originals/a8/91/8a/a8918a2421977089bc5c167158cff466.png'

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import retrofit.TickerDetails
import retrofit.TickerSummary
import retrofit2.Response
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.launch
import retrofit.RetrofitHelper
import retrofit.retrofitInterface
import kotlinx.coroutines.Dispatchers
Expand Down Expand Up @@ -103,11 +102,11 @@ class BackendData {
val symbolSummaryList = mutableListOf<TickerSummary>()
val tickersList = getTickersList()

if (tickersList.isNullOrEmpty()) {
if (tickersList.isEmpty()) {
Log.e("MyTag: ", "Failed to fetch details for ticker: $tickersList")
return emptyList()
}
for (ticker in tickersList!!) {
for (ticker in tickersList) {
val responseSymbolSummary: Response<TickerSummary> =
tickersAPI.getSymbolSummary(ticker)
if (responseSymbolSummary.isSuccessful) {
Expand All @@ -116,7 +115,6 @@ class BackendData {
symbolSummaryList.add(tickerSummary)
}
} else {
// Handle the error, log it, or throw a custom exception
Log.e("MyTag: ", "Failed to fetch summary for ticker: $ticker")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.example.TPSIMobileProjecto.R
import com.example.TPSIMobileProjecto.databinding.FragmentNewsBinding
import com.example.TPSIMobileProjecto.ui.home.stockFragments.checklist.ChecklistRecyclerAdapter

class NewsFragment : Fragment() {
private lateinit var itemAdapter : NewsRecyclerAdapter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import androidx.lifecycle.ViewModelProvider
import com.example.TPSIMobileProjecto.databinding.FragmentHomeBinding
import com.example.TPSIMobileProjecto.ui.home.stockFragments.simpleCard.SimpleCardFragment
import com.example.TPSIMobileProjecto.R
Expand All @@ -28,7 +27,6 @@ class HomeFragment : Fragment(){
): View {

Log.e("Lifecycle", "HomeFragment onCreateView()")
val homeViewModel = ViewModelProvider(this).get(HomeViewModel::class.java)

_binding = FragmentHomeBinding.inflate(inflater, container, false)
val root: View = binding.root
Expand All @@ -37,8 +35,7 @@ class HomeFragment : Fragment(){
.addToBackStack(null)
.commit()
return root



}

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
Expand Down Expand Up @@ -70,6 +67,7 @@ class HomeFragment : Fragment(){
override fun onResume() {
super.onResume()
}

override fun onStart() {
super.onStart()
Log.e("Lifecycle", "HomeFragment onStart()")
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.view.ViewStub
import android.widget.Button
import android.widget.EditText
import android.widget.ProgressBar
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.example.TPSIMobileProjecto.ui.home.stockFragments.simpleCard

import android.content.Context
import androidx.lifecycle.ViewModelProvider
import android.os.Bundle
import android.util.Log
import androidx.fragment.app.Fragment
Expand All @@ -21,7 +20,6 @@ import retrofit.TickerSummary

class SimpleCardFragment(watchList : MutableList<TickerSummary>, isFromWatchList : Boolean) : Fragment(), SimpleRecyclerAdapter.DetailedViewOnClick {
val watchList = watchList
private lateinit var viewModel: SimpleCardViewModel
val isFromWatchlist = isFromWatchList
private lateinit var emptyListStub : ViewStub

Expand All @@ -35,7 +33,6 @@ class SimpleCardFragment(watchList : MutableList<TickerSummary>, isFromWatchList
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
Log.e("Lifecycle", "SimpleFragment onViewCreated()")
viewModel = ViewModelProvider(this).get(SimpleCardViewModel::class.java)
emptyListStub = requireView().findViewById(R.id.simpleFragment_null_handle_list)

if (watchList.isEmpty() && !isFromWatchlist){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import android.widget.TextView
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.RecyclerView
import com.example.TPSIMobileProjecto.R
import com.example.TPSIMobileProjecto.ui.home.stockFragments.checklist.ChecklistRecyclerAdapter
import com.squareup.picasso.Picasso
import retrofit.TickerSummary

Expand Down

0 comments on commit 6ec9e4a

Please sign in to comment.