Skip to content

sprint_17#6

Open
Crowru wants to merge 9 commits intomainfrom
sprint_17
Open

sprint_17#6
Crowru wants to merge 9 commits intomainfrom
sprint_17

Conversation

@Crowru
Copy link
Owner

@Crowru Crowru commented Oct 20, 2023

finished the tasks

guard let categories = viewModel?.categories.isEmpty else { return }
if categories {
guard let image = UIImage(named: "errorImage") else { return }
let emptyView = EmptyView(frame: CGRect(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Рекомендую придерживаться следующего стиля написания длинных вызовов и длинных объявлений функций. Как пример можешь использовать то, что я напишу. Такой формат принят за основу во многих компаниях и следование ему даст несколько очков к карме при работе над боевыми проектами

            let emptyView = EmptyView(
                frame: CGRect(
                    x: 0,
                    y: 0,
                    width: view.bounds.width,
                    height: view.bounds.height
                ),
                image: ImageAssets.trackerErrorImage,
                text: LocalizableKeys.trackerViewStubCategory
            )

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Здравствуйте, с локализацией не могу понять, у меня работает она при редактировании схемы и при просто смене языка на стимуляторе, в чем может быть проблема. Видео закрепляю

4057881689539891705.mov

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

тесты исправил, теперь работает всё и при смене цвета перестает работать как и должно быть

completedTrackers = trackerRecordStore.trackerRecords

view.addSubviews(collectionView)
pinnedCategories = categories.filter({ trackerCategory in

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

для чистоты кода можно убрать круглые скобки, оставив только фигурные


final class WeekdaysMarshalling {
private let weekdays: [String] = ["Пн", "Вт", "Ср", "Чт", "Пт", "Сб", "Вс"]
private let weekdays: [String] = [

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не забывай про форматирование кода в проекте. Отступы можно поправить с помощью сочетаний клавиш cmd+a, control+i. Советую пройтись и это сделать в каждом файле

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants