[Framework] Feed item filtering in the Feed List view (#11)
This PR contains the work done to implement the filtering of the items shown in the `FeedListViewController` view controller by star rating. Reviewed-on: rock-n-code/app-reviews#11 Co-authored-by: Javier Cicchelli <javier@rock-n-code.com> Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
This commit was merged in pull request #11.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// Bundle+Constants.swift
|
||||
// ReviewsFeed
|
||||
//
|
||||
// Created by Javier Cicchelli on 20/03/2024.
|
||||
// Copyright © 2024 Röck+Cöde. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Bundle {
|
||||
|
||||
// MARK: Constants
|
||||
static let module = Bundle(for: FeedItemViewController.self)
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// Review+DTOs.swift
|
||||
// ReviewsFeed
|
||||
//
|
||||
// Created by Javier Cicchelli on 20/03/2024.
|
||||
// Copyright © 2024 Röck+Cöde. All rights reserved.
|
||||
//
|
||||
|
||||
import ReviewsFeedKit
|
||||
|
||||
extension Review {
|
||||
|
||||
// MARK: Initialisers
|
||||
init(_ dto: ReviewsFeedKit.Review) {
|
||||
self = .init(
|
||||
author: dto.author,
|
||||
comment: dto.content,
|
||||
id: dto.id,
|
||||
rating: .init(
|
||||
stars: dto.rating,
|
||||
appVersion: dto.version
|
||||
),
|
||||
title: dto.title
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user