<commit_before>//
//  MasterUnreadCountView.swift
//  NetNewsWire
//
//  Created by <NAME> on 11/22/15.
//  Copyright © 2015 Ranchero Software, LLC. All rights reserved.
//

import UIKit

class MasterFeedUnreadCountView : UIView {
	
	private let padding = UIEdgeInsets(top: 1.0, left: 7.0, bottom: 1.0, right: 7.0)
	private let cornerRadius = 8.0
	private let bgColor = UIColor.darkGray
	private let textColor = UIColor.white
	private var textAttributes: [NSAttributedString.Key: AnyObject] {
		let textFont = UIFont.preferredFont(forTextStyle: .caption1)
		return [NSAttributedString.Key.foregroundColor: textColor, NSAttributedString.Key.font: textFont, NSAttributedString.Key.kern: NSNull()]
	}
	private var textSizeCache = [Int: CGSize]()

	var unreadCount = 0 {
		didSet {
			invalidateIntrinsicContentSize()<commit_msg>Invalidate content size correctly<commit_after>//
//  MasterUnreadCountView.swift
//  NetNewsWire
//
//  Created by <NAME> on 11/22/15.
//  Copyright © 2015 Ranchero Software, LLC. All rights reserved.
//

import UIKit

class MasterFeedUnreadCountView : UIView {
	
	private let padding = UIEdgeInsets(top: 1.0, left: 7.0, bottom: 1.0, right: 7.0)
	private let cornerRadius = 8.0
	private let bgColor = UIColor.darkGray
	private let textColor = UIColor.white
	private var textAttributes: [NSAttributedString.Key: AnyObject] {
		let textFont = UIFont.preferredFont(forTextStyle: .caption1)
		return [NSAttributedString.Key.foregroundColor: textColor, NSAttributedString.Key.font: textFont, NSAttributedString.Key.kern: NSNull()]
	}
	private var textSizeCache = [Int: CGSize]()

	var unreadCount = 0 {
		didSet {
			contentSizeIsValid = false
{'fraction_non_alphanumeric': 0.10516826923076923, 'fraction_numerical': 0.026442307692307692, 'mean_word_length': 4.4058441558441555, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2007743', 'n_tokens_mistral': 607, 'n_tokens_neox': 555, 'n_words': 145}