[ios] Fixed crash (only xib was cleaned)

Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
Alexander Borsuk 2021-05-06 16:37:05 +02:00 committed by Viktor Govako
parent 55bf42f3fb
commit 2a0738b4f1
3 changed files with 0 additions and 99 deletions

View file

@ -137,99 +137,6 @@ public class BookmarkCategory implements Parcelable
return mPlurals;
}
}
public static class Author implements Parcelable
{
@NonNull
private final String mId;
@NonNull
private final String mName;
public Author(@NonNull String id, @NonNull String name)
{
mId = id;
mName = name;
}
@NonNull
public String getId()
{
return mId;
}
@NonNull
public String getName()
{
return mName;
}
@Override
public String toString()
{
final StringBuilder sb = new StringBuilder("Author{");
sb.append("mId='").append(mId).append('\'');
sb.append(", mName='").append(mName).append('\'');
sb.append('}');
return sb.toString();
}
@Override
public boolean equals(Object o)
{
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Author author = (Author) o;
return mId.equals(author.mId);
}
@Override
public int hashCode()
{
return mId.hashCode();
}
@Override
public int describeContents()
{
return 0;
}
@NonNull
public static String getRepresentation(@NonNull Context context, @NonNull Author author)
{
Resources res = context.getResources();
return String.format(res.getString(R.string.author_name_by_prefix), author.getName());
}
@Override
public void writeToParcel(Parcel dest, int flags)
{
dest.writeString(this.mId);
dest.writeString(this.mName);
}
protected Author(Parcel in)
{
this.mId = in.readString();
this.mName = in.readString();
}
public static final Creator<Author> CREATOR = new Creator<Author>()
{
@Override
public Author createFromParcel(Parcel source)
{
return new Author(source);
}
@Override
public Author[] newArray(int size)
{
return new Author[size];
}
};
}
@Override
public String toString()
{

View file

@ -17,8 +17,6 @@ final class BookmarksListInfoViewController: UIViewController {
@IBOutlet private var titleLabel: UILabel!
@IBOutlet private var descriptionButton: UIButton!
@IBOutlet private var authorContainerView: UIView!
@IBOutlet private var authorImageView: UIImageView!
@IBOutlet private var authorLabel: UILabel!
@IBOutlet private var infoStack: UIStackView!
@IBOutlet private var separatorsConstraints: [NSLayoutConstraint]!
@ -37,9 +35,6 @@ final class BookmarksListInfoViewController: UIViewController {
private func updateInfo(_ info: IBookmakrsListInfoViewModel) {
titleLabel.text = info.title
authorLabel.text = String(coreFormat: L("author_name_by_prefix"), arguments: [info.author])
authorImageView.isHidden = true
authorContainerView.isHidden = info.author.isEmpty
descriptionButton.isHidden = !info.hasDescription
titleImageView.isHidden = true

View file

@ -114,7 +114,6 @@ protocol IBookmarksListRouter {
protocol IBookmakrsListInfoViewModel {
var title: String { get }
var author: String { get }
var hasDescription: Bool { get }
var imageUrl: URL? { get }
}